From c502dc6ed888a4cf2c8b36176585f4166536ab6d Mon Sep 17 00:00:00 2001 From: Joe Chen Date: Sat, 22 Oct 2022 14:41:40 +0800 Subject: refactor(db): move some methods from `user.go` to `users.go` (#7195) --- internal/route/api/v1/org/org.go | 2 +- internal/route/api/v1/user/user.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/route/api') 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 { -- cgit v1.2.3