mirror of
https://github.com/h44z/wg-portal.git
synced 2025-09-13 14:31:15 +00:00
Add Interface column in user profile and fix sorting
This commit is contained in:
@@ -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, "/admin")
|
||||
return*/
|
||||
}
|
||||
|
||||
peers := s.peers.GetSortedPeersForEmail(currentSession.SortedBy["userpeers"], currentSession.SortDirection["userpeers"], currentSession.Email)
|
||||
|
@@ -731,6 +731,9 @@ func sortPeers(sortKey string, sortDirection string, peers []Peer) {
|
||||
case "endpoint":
|
||||
sortValueLeft = peers[i].Endpoint
|
||||
sortValueRight = peers[j].Endpoint
|
||||
case "device":
|
||||
sortValueLeft = peers[i].DeviceName
|
||||
sortValueRight = peers[j].DeviceName
|
||||
case "handshake":
|
||||
if peers[i].Peer == nil {
|
||||
return true
|
||||
|
Reference in New Issue
Block a user