aboutsummaryrefslogtreecommitdiff
path: root/internal/route/api/v1/admin/user.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/route/api/v1/admin/user.go')
-rw-r--r--internal/route/api/v1/admin/user.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/route/api/v1/admin/user.go b/internal/route/api/v1/admin/user.go
index c339edd2..06c6569f 100644
--- a/internal/route/api/v1/admin/user.go
+++ b/internal/route/api/v1/admin/user.go
@@ -23,7 +23,7 @@ func parseLoginSource(c *context.APIContext, u *db.User, sourceID int64, loginNa
return
}
- source, err := db.GetLoginSourceByID(sourceID)
+ source, err := db.LoginSources.GetByID(sourceID)
if err != nil {
if errors.IsLoginSourceNotExist(err) {
c.ErrorStatus(http.StatusUnprocessableEntity, err)
@@ -45,7 +45,7 @@ func CreateUser(c *context.APIContext, form api.CreateUserOption) {
Email: form.Email,
Passwd: form.Password,
IsActive: true,
- LoginType: db.LOGIN_PLAIN,
+ LoginType: db.LoginPlain,
}
parseLoginSource(c, u, form.SourceID, form.LoginName)