fix user_edit template

This commit is contained in:
Christoph Haas 2021-03-22 13:42:28 +01:00
parent f95c692aed
commit 1e9f845457
2 changed files with 3 additions and 1 deletions

View File

@ -14,7 +14,7 @@
{{template "prt_nav.html" .}}
<div class="container mt-5">
{{if eq .User.CreatedAt .Epoch}}
<h1>Create a new user</h1>
<h1>Create a new user</h1><!-- fix me!!! -.>
{{else}}
<h1>Edit user <strong>{{.User.Email}}</strong></h1>
{{end}}

View File

@ -78,6 +78,7 @@ func (s *Server) GetAdminUsersEdit(c *gin.Context) {
"User": currentSession.FormData.(users.User),
"Device": s.peers.GetDevice(currentSession.DeviceName),
"DeviceNames": s.wg.Cfg.DeviceNames,
"Epoch": time.Time{},
})
}
@ -154,6 +155,7 @@ func (s *Server) GetAdminUsersCreate(c *gin.Context) {
"User": currentSession.FormData.(users.User),
"Device": s.peers.GetDevice(currentSession.DeviceName),
"DeviceNames": s.wg.Cfg.DeviceNames,
"Epoch": time.Time{},
})
}