aboutsummaryrefslogtreecommitdiff
path: root/routes/user.go
diff options
context:
space:
mode:
authorAlexander NeonXP Kiryukhin <i@neonxp.ru>2024-07-21 19:26:56 +0300
committerAlexander NeonXP Kiryukhin <i@neonxp.ru>2024-07-21 19:28:56 +0300
commitce3111b0efe91e275ce070f9511b5b1b9801a46d (patch)
tree09fa4f10dfb1e17761339c798eefa73c6b18484f /routes/user.go
parente9a64f3b41b5eae47dec7c0ecfd1caae83136abc (diff)
Множество улучшенийv0.0.2
Diffstat (limited to 'routes/user.go')
-rw-r--r--routes/user.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/routes/user.go b/routes/user.go
index 95d5717..dd5bd61 100644
--- a/routes/user.go
+++ b/routes/user.go
@@ -7,6 +7,7 @@ import (
"github.com/gorilla/sessions"
"github.com/labstack/echo-contrib/session"
"github.com/labstack/echo/v4"
+ "gitrepo.ru/neonxp/gorum/models"
"gitrepo.ru/neonxp/gorum/utils"
"gitrepo.ru/neonxp/gorum/views"
)
@@ -72,7 +73,7 @@ func (r *Router) Register(c echo.Context) error {
return err
}
if c.Request().Method == http.MethodPost {
- uid, err := r.userRepo.Create(c.Request().Context(), req.Email, req.Password, req.Username)
+ uid, err := r.userRepo.Create(c.Request().Context(), req.Email, req.Password, req.Username, models.RoleUser)
if err != nil {
return err
}