From 650f66e6472e7ed9feb64eda2bc329183de5982e Mon Sep 17 00:00:00 2001 From: anxi0uz Date: Fri, 20 Mar 2026 18:28:48 +0500 Subject: [PATCH 1/2] roles added for register v2 --- internal/handler/user.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/handler/user.go b/internal/handler/user.go index 1f8c3b7..8055244 100644 --- a/internal/handler/user.go +++ b/internal/handler/user.go @@ -163,6 +163,7 @@ func (s *Server) AuthRegister(w http.ResponseWriter, r *http.Request) { Slug: s.GenerateUserSlug(req.FullName, uuid), CreatedAt: now, UpdatedAt: now, + Role: string(req.Role), Email: string(req.Email), PasswordHash: string(passwordHash), FullName: req.FullName, From 60a4e7a2b820c1a2c878e344365a58ef11e696e1 Mon Sep 17 00:00:00 2001 From: anxi0uz Date: Fri, 20 Mar 2026 18:29:33 +0500 Subject: [PATCH 2/2] roles added for register v2 --- internal/handler/user.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/handler/user.go b/internal/handler/user.go index 8055244..6cd351d 100644 --- a/internal/handler/user.go +++ b/internal/handler/user.go @@ -139,6 +139,8 @@ func (s *Server) AuthRefresh(w http.ResponseWriter, r *http.Request) { } s.issueTokens(w, r, user) } + +// working func (s *Server) AuthRegister(w http.ResponseWriter, r *http.Request) { ctx := r.Context() var req api.RegisterRequest