aboutsummaryrefslogtreecommitdiff
path: root/internal/route/home.go
diff options
context:
space:
mode:
authorᴜɴᴋɴᴡᴏɴ <u@gogs.io>2020-04-18 12:07:30 +0800
committerGitHub <noreply@github.com>2020-04-18 12:07:30 +0800
commit9d64d222a8c30db5076a591981ad7cfe672ba6f1 (patch)
treec753eb898a1ead0afbe5b6a7a28b466ab0d2b8ac /internal/route/home.go
parentfa497b16332c24bc4d9e788c64bda94e3c1499a7 (diff)
db: add tests for users (#6116)
* Add new methods * Use Users.Create to replace previous hack * Reduce side effect * Do not clear tables when test failed * test_users_Authenticate * Rename constant * test_users_Create * test_users_GetByEmail * test_users_GetByID * test_users_GetByUsername
Diffstat (limited to 'internal/route/home.go')
-rw-r--r--internal/route/home.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/route/home.go b/internal/route/home.go
index 7338c9e8..d040b957 100644
--- a/internal/route/home.go
+++ b/internal/route/home.go
@@ -138,7 +138,7 @@ func ExploreUsers(c *context.Context) {
c.Data["PageIsExploreUsers"] = true
RenderUserSearch(c, &UserSearchOptions{
- Type: db.USER_TYPE_INDIVIDUAL,
+ Type: db.UserIndividual,
Counter: db.CountUsers,
Ranger: db.ListUsers,
PageSize: conf.UI.ExplorePagingNum,
@@ -153,7 +153,7 @@ func ExploreOrganizations(c *context.Context) {
c.Data["PageIsExploreOrganizations"] = true
RenderUserSearch(c, &UserSearchOptions{
- Type: db.USER_TYPE_ORGANIZATION,
+ Type: db.UserOrganization,
Counter: db.CountOrganizations,
Ranger: db.Organizations,
PageSize: conf.UI.ExplorePagingNum,