aboutsummaryrefslogtreecommitdiff
path: root/routes/user.go
diff options
context:
space:
mode:
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
}