Handle no avatar, add delete avatar support

This commit is contained in:
blankhex committed 2026-10-22 23:08:23 +03:00
1 parent 35bff424f1
commit 3864a4c1cc
9 files changed
+110 -11

No files matched your search

+2 -2
View File
@@ -50,7 +50,7 @@ func (h *Handler) signup(w http.ResponseWriter, r *http.Request) {
auth.SigninSetup(w, h.cfg.Cookies.SessionName, session.Token, session.ExpiresAt, h.cfg.Cookies.Secure)
h.refreshCsrf(w)
writeJson(w, http.StatusCreated, newUserResponse(u))
h.respondUser(w, r, u, http.StatusCreated)
}
func (h *Handler) signin(w http.ResponseWriter, r *http.Request) {
@@ -79,7 +79,7 @@ func (h *Handler) signin(w http.ResponseWriter, r *http.Request) {
auth.SigninSetup(w, h.cfg.Cookies.SessionName, session.Token, session.ExpiresAt, h.cfg.Cookies.Secure)
h.refreshCsrf(w)
writeJson(w, http.StatusOK, newUserResponse(u))
h.respondUser(w, r, u, http.StatusOK)
}
func (h *Handler) signout(w http.ResponseWriter, r *http.Request) {