Add token listing at GET /tokens, also add a token-fixing tool at /tokens/fix_privileges.
By the way, 100th commit on the API!
This commit is contained in:
@@ -46,6 +46,7 @@ func Start(conf common.Conf, dbO *sql.DB) *gin.Engine {
|
||||
gv1.GET("/badges", Method(v1.BadgesGET, common.PrivilegeRead))
|
||||
gv1.GET("/beatmaps", Method(v1.BeatmapGET, common.PrivilegeRead))
|
||||
gv1.GET("/leaderboard", Method(v1.LeaderboardGET, common.PrivilegeRead))
|
||||
gv1.GET("/tokens", Method(v1.TokenGET, common.PrivilegeRead))
|
||||
|
||||
// ReadConfidential privilege required
|
||||
gv1.GET("/friends", Method(v1.FriendsGET, common.PrivilegeReadConfidential))
|
||||
@@ -70,6 +71,10 @@ func Start(conf common.Conf, dbO *sql.DB) *gin.Engine {
|
||||
gv1.GET("/meta/kill", Method(v1.MetaKillGET, common.PrivilegeAPIMeta))
|
||||
gv1.GET("/meta/up_since", Method(v1.MetaUpSinceGET, common.PrivilegeAPIMeta))
|
||||
gv1.GET("/meta/update", Method(v1.MetaUpdateGET, common.PrivilegeAPIMeta))
|
||||
|
||||
// User Managing + meta
|
||||
gv1.GET("/tokens/fix_privileges", Method(v1.TokenFixPrivilegesGET,
|
||||
common.PrivilegeManageUser, common.PrivilegeAPIMeta))
|
||||
}
|
||||
|
||||
api.GET("/status", internals.Status)
|
||||
|
Reference in New Issue
Block a user