diff options
author | Joe Chen <jc@unknwon.io> | 2022-10-22 14:41:40 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-22 14:41:40 +0800 |
commit | c502dc6ed888a4cf2c8b36176585f4166536ab6d (patch) | |
tree | 71e3f758069dc2435eecb88ae786b2efaaa972f9 /internal/route/api/v1 | |
parent | 260e990be75885e1a560df449dacdeecafeffdcf (diff) |
refactor(db): move some methods from `user.go` to `users.go` (#7195)
Diffstat (limited to 'internal/route/api/v1')
-rw-r--r-- | internal/route/api/v1/org/org.go | 2 | ||||
-rw-r--r-- | internal/route/api/v1/user/user.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/internal/route/api/v1/org/org.go b/internal/route/api/v1/org/org.go index 7a7de50e..4d987dbf 100644 --- a/internal/route/api/v1/org/org.go +++ b/internal/route/api/v1/org/org.go @@ -27,7 +27,7 @@ func CreateOrgForUser(c *context.APIContext, apiForm api.CreateOrgOption, user * Website: apiForm.Website, Location: apiForm.Location, IsActive: true, - Type: db.UserOrganization, + Type: db.UserTypeOrganization, } if err := db.CreateOrganization(org, user); err != nil { if db.IsErrUserAlreadyExist(err) || diff --git a/internal/route/api/v1/user/user.go b/internal/route/api/v1/user/user.go index c57f8fed..2b26a282 100644 --- a/internal/route/api/v1/user/user.go +++ b/internal/route/api/v1/user/user.go @@ -19,7 +19,7 @@ import ( func Search(c *context.APIContext) { opts := &db.SearchUserOptions{ Keyword: c.Query("q"), - Type: db.UserIndividual, + Type: db.UserTypeIndividual, PageSize: com.StrTo(c.Query("limit")).MustInt(), } if opts.PageSize == 0 { |