Перенести пользователей в PostgreSQL и добавить пароли

This commit is contained in:
2026-10-06 14:54:34 +03:00
parent 46c00436a0
commit 618d3919d1
17 changed files with 482 additions and 219 deletions
+2 -1
View File
@@ -27,6 +27,7 @@ func (h *Handler) Register(public, protected gin.IRouter) {
type createRequest struct {
Username string `json:"username"`
DisplayName string `json:"display_name"`
Password string `json:"password"`
}
type Response struct {
@@ -51,7 +52,7 @@ func (h *Handler) register(c *gin.Context) {
httpx.Error(c, err)
return
}
u, err := h.users.Register(c.Request.Context(), req.Username, req.DisplayName)
u, err := h.users.Register(c.Request.Context(), req.Username, req.DisplayName, req.Password)
if err != nil {
httpx.Error(c, err)
return