lfs: implement HTTP routes (#6035)

* Bootstrap with GORM

* Fix lint error

* Set conn max lifetime to one minute

* Fallback to use gorm v1

* Define HTTP routes

* Finish authentication

* Save token updated

* Add docstring

* Finish authorization

* serveBatch rundown

* Define types in lfsutil

* Finish Batch

* authutil

* Finish basic

* Formalize response error

* Fix lint errors

* authutil: add tests

* dbutil: add tests

* lfsutil: add tests

* strutil: add tests

* Formalize 401 response
This commit is contained in:
ᴜɴᴋɴᴡᴏɴ
2020-04-04 21:14:15 +08:00
committed by GitHub
parent 2bd9d0b9c8
commit 34145c990d
69 changed files with 1847 additions and 558 deletions

View File

@@ -135,7 +135,7 @@ func ExploreUsers(c *context.Context) {
RenderUserSearch(c, &UserSearchOptions{
Type: db.USER_TYPE_INDIVIDUAL,
Counter: db.CountUsers,
Ranger: db.Users,
Ranger: db.ListUsers,
PageSize: conf.UI.ExplorePagingNum,
OrderBy: "updated_unix DESC",
TplName: EXPLORE_USERS,