mirror of
https://github.com/h44z/wg-portal.git
synced 2025-10-04 07:26:18 +00:00
Feature (v1): add latest handshake data to API response (#203)
* feature: updated handshake-related fields type * feature: updated handshake representations in templates * feature: added handshake field to Swagger schema
This commit is contained in:
@@ -1512,6 +1512,9 @@ const docTemplate = `{
|
||||
"IgnoreGlobalSettings": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"LastHandshakeTime": {
|
||||
"type": "string"
|
||||
},
|
||||
"Mtu": {
|
||||
"description": "Global Device Settings (can be ignored, only make sense if device is in server mode)",
|
||||
"type": "integer",
|
||||
|
@@ -128,6 +128,7 @@ func (s *Server) Setup(ctx context.Context) error {
|
||||
s.server.Use(sessions.Sessions("authsession", cookieStore))
|
||||
s.server.SetFuncMap(template.FuncMap{
|
||||
"formatDate": common.FormatDateHTML,
|
||||
"formatTime": common.FormatToUnixTime,
|
||||
"formatBytes": common.ByteCountSI,
|
||||
"urlEncode": url.QueryEscape,
|
||||
"startsWith": strings.HasPrefix,
|
||||
|
Reference in New Issue
Block a user