From e76c573b1df88915875c40c5f5917459f7ab5960 Mon Sep 17 00:00:00 2001 From: Paul Dee Date: Mon, 26 Dec 2022 10:02:07 +0100 Subject: [PATCH] Some comment fixes (#278) --- handler/routes.go | 4 ++-- store/jsondb/jsondb.go | 4 ++-- templates/clients.html | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/handler/routes.go b/handler/routes.go index 295eb9d..3ddbb2d 100644 --- a/handler/routes.go +++ b/handler/routes.go @@ -175,7 +175,7 @@ func WireGuardClients(db store.IStore) echo.HandlerFunc { } } -// GetClients handler return a list of Wireguard client data +// GetClients handler return a JSON list of Wireguard client data func GetClients(db store.IStore) echo.HandlerFunc { return func(c echo.Context) error { @@ -190,7 +190,7 @@ func GetClients(db store.IStore) echo.HandlerFunc { } } -// GetClient handler return a of Wireguard client data +// GetClient handler returns a JSON object of Wireguard client data func GetClient(db store.IStore) echo.HandlerFunc { return func(c echo.Context) error { diff --git a/store/jsondb/jsondb.go b/store/jsondb/jsondb.go index a19961d..f39a452 100644 --- a/store/jsondb/jsondb.go +++ b/store/jsondb/jsondb.go @@ -138,7 +138,7 @@ func (o *JsonDB) GetGlobalSettings() (model.GlobalSetting, error) { return settings, o.conn.Read("server", "global_settings", &settings) } -// GetServer func to query Server setting from the database +// GetServer func to query Server settings from the database func (o *JsonDB) GetServer() (model.Server, error) { server := model.Server{} // read server interface information @@ -162,7 +162,7 @@ func (o *JsonDB) GetServer() (model.Server, error) { func (o *JsonDB) GetClients(hasQRCode bool) ([]model.ClientData, error) { var clients []model.ClientData - // read all client json file in "clients" directory + // read all client json files in "clients" directory records, err := o.conn.ReadAll("clients") if err != nil { return clients, err diff --git a/templates/clients.html b/templates/clients.html index db6ddad..689c261 100644 --- a/templates/clients.html +++ b/templates/clients.html @@ -418,7 +418,7 @@ Wireguard Clients }); } - // submitEmailClient function for sending an email to the client with the configuration + // submitEmailClient function for sending an email with the configuration to the client function submitEmailClient() { const client_id = $("#e_client_id").val(); const email = $("#e_client_email").val();