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

+1
View File
@@ -27,6 +27,7 @@ func (h *Handler) registerRoutes(mux *http.ServeMux) {
mux.Handle("PUT /api/profile/password", userChain.ThenFunc(h.updatePassword))
mux.Handle("POST /api/profile/avatar", userChain.ThenFunc(h.uploadAvatar))
mux.Handle("PUT /api/profile/avatar", userChain.ThenFunc(h.uploadAvatar))
mux.Handle("DELETE /api/profile/avatar", userChain.ThenFunc(h.deleteAvatar))
mux.Handle("GET /api/profile/avatar", userChain.ThenFunc(h.getAvatar))
mux.Handle("GET /api/sessions", userChain.ThenFunc(h.listSessions))