1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

chore: include avatar rendering into wakapi itself

This commit is contained in:
Ferdinand Mütsch
2022-02-17 09:53:37 +01:00
parent 5cc932177f
commit 660a09475e
10 changed files with 49 additions and 9 deletions

View File

@@ -299,12 +299,11 @@ func (h *LoginHandler) PostResetPassword(w http.ResponseWriter, r *http.Request)
func (h *LoginHandler) buildViewModel(r *http.Request) *view.LoginViewModel {
numUsers, _ := h.userSrvc.Count()
allowSignup := h.config.Security.AllowSignup
return &view.LoginViewModel{
Success: r.URL.Query().Get("success"),
Error: r.URL.Query().Get("error"),
TotalUsers: int(numUsers),
AllowSignup: allowSignup,
AllowSignup: h.config.IsDev() || h.config.Security.AllowSignup,
}
}