Add Interface column in user profile and fix sorting

This commit is contained in:
Philipp Harms
2023-02-22 03:43:13 +01:00
committed by h44z
parent 8de4da8984
commit 20b71b4e1f
3 changed files with 7 additions and 2 deletions

View File

@@ -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)

View File

@@ -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