mirror of
https://github.com/h44z/wg-portal.git
synced 2025-09-19 17:01:15 +00:00
populate peer device type (#170)
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
// Package docs GENERATED BY SWAG; DO NOT EDIT
|
||||
// This file was generated by swaggo/swag
|
||||
// Code generated by swaggo/swag. DO NOT EDIT
|
||||
package docs
|
||||
|
||||
import "github.com/swaggo/swag"
|
||||
@@ -1307,13 +1306,28 @@ const docTemplate = `{
|
||||
"type": "string"
|
||||
},
|
||||
"Source": {
|
||||
"type": "string"
|
||||
"$ref": "#/definitions/users.UserSource"
|
||||
},
|
||||
"UpdatedAt": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"users.UserSource": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ldap",
|
||||
"db"
|
||||
],
|
||||
"x-enum-comments": {
|
||||
"UserSourceDatabase": "sqlite / mysql database",
|
||||
"UserSourceLdap": "LDAP / ActiveDirectory"
|
||||
},
|
||||
"x-enum-varnames": [
|
||||
"UserSourceLdap",
|
||||
"UserSourceDatabase"
|
||||
]
|
||||
},
|
||||
"wireguard.Device": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
@@ -1400,10 +1414,14 @@ const docTemplate = `{
|
||||
"type": "boolean"
|
||||
},
|
||||
"Type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"client",
|
||||
"server"
|
||||
],
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/wireguard.DeviceType"
|
||||
}
|
||||
]
|
||||
},
|
||||
"UpdatedAt": {
|
||||
@@ -1411,6 +1429,17 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"wireguard.DeviceType": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"server",
|
||||
"client"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"DeviceTypeServer",
|
||||
"DeviceTypeClient"
|
||||
]
|
||||
},
|
||||
"wireguard.Peer": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
@@ -1447,13 +1476,19 @@ const docTemplate = `{
|
||||
"type": "string"
|
||||
},
|
||||
"DeviceName": {
|
||||
"description": "server interface name",
|
||||
"type": "string"
|
||||
},
|
||||
"DeviceType": {
|
||||
"type": "string",
|
||||
"description": "the device type of the server (not the peer device)",
|
||||
"enum": [
|
||||
"client",
|
||||
"server"
|
||||
],
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/wireguard.DeviceType"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Email": {
|
||||
|
@@ -128,8 +128,8 @@ func (s *Server) GetUserIndex(c *gin.Context) {
|
||||
s.GetHandleError(c, http.StatusInternalServerError, "sort error", "failed to save session")
|
||||
return
|
||||
}
|
||||
/*c.Redirect(http.StatusSeeOther, "/admin")
|
||||
return*/
|
||||
c.Redirect(http.StatusSeeOther, "/user/profile")
|
||||
return
|
||||
}
|
||||
|
||||
peers := s.peers.GetSortedPeersForEmail(currentSession.SortedBy["userpeers"], currentSession.SortDirection["userpeers"], currentSession.Email)
|
||||
|
Reference in New Issue
Block a user