Add beatmap rank requests
This commit is contained in:
11
app/start.go
11
app/start.go
@@ -13,12 +13,14 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/jmoiron/sqlx"
|
||||
"github.com/serenize/snaker"
|
||||
"gopkg.in/redis.v5"
|
||||
)
|
||||
|
||||
var (
|
||||
db *sqlx.DB
|
||||
cf common.Conf
|
||||
doggo *statsd.Client
|
||||
red *redis.Client
|
||||
)
|
||||
|
||||
var commonClusterfucks = map[string]string{
|
||||
@@ -65,6 +67,13 @@ func Start(conf common.Conf, dbO *sqlx.DB) *gin.Engine {
|
||||
doggo.Incr("requests", nil, 1)
|
||||
})
|
||||
|
||||
// redis
|
||||
red = redis.NewClient(&redis.Options{
|
||||
Addr: conf.RedisAddr,
|
||||
Password: conf.RedisPassword,
|
||||
DB: conf.RedisDB,
|
||||
})
|
||||
|
||||
api := r.Group("/api")
|
||||
{
|
||||
p := api.Group("/")
|
||||
@@ -119,7 +128,7 @@ func Start(conf common.Conf, dbO *sqlx.DB) *gin.Engine {
|
||||
gv1.POST("/friends/del", Method(v1.FriendsDelPOST, common.PrivilegeWrite))
|
||||
gv1.POST("/users/self/settings", Method(v1.UsersSelfSettingsPOST, common.PrivilegeWrite))
|
||||
gv1.POST("/users/self/userpage", Method(v1.UserSelfUserpagePOST, common.PrivilegeWrite))
|
||||
//gv1.POST("/beatmaps/rank_requests", Method(v1.BeatmapRankRequestsSubmitPOST, common.PrivilegeWrite))
|
||||
gv1.POST("/beatmaps/rank_requests", Method(v1.BeatmapRankRequestsSubmitPOST, common.PrivilegeWrite))
|
||||
|
||||
// Admin: beatmap
|
||||
gv1.POST("/beatmaps/set_status", Method(v1.BeatmapSetStatusPOST, common.PrivilegeBeatmap))
|
||||
|
Reference in New Issue
Block a user