email reward
This commit is contained in:
@@ -6,6 +6,8 @@ package handler
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
admin "nova_task/internal/handler/admin"
|
||||
carv "nova_task/internal/handler/carv"
|
||||
task "nova_task/internal/handler/task"
|
||||
"nova_task/internal/svc"
|
||||
|
||||
@@ -13,6 +15,60 @@ import (
|
||||
)
|
||||
|
||||
func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
server.AddRoutes(
|
||||
rest.WithMiddlewares(
|
||||
[]rest.Middleware{serverCtx.AdminSecretCheck},
|
||||
[]rest.Route{
|
||||
{
|
||||
// 每日钱包签到任务
|
||||
Method: http.MethodPost,
|
||||
Path: "/email_reward",
|
||||
Handler: admin.AddEmailRewardHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
// 执行发放奖励操作
|
||||
Method: http.MethodGet,
|
||||
Path: "/email_reward",
|
||||
Handler: admin.SendEmailRewardHandler(serverCtx),
|
||||
},
|
||||
}...,
|
||||
),
|
||||
rest.WithPrefix("/gapi/admin"),
|
||||
)
|
||||
|
||||
server.AddRoutes(
|
||||
rest.WithMiddlewares(
|
||||
[]rest.Middleware{serverCtx.ApiKeyCheck},
|
||||
[]rest.Route{
|
||||
{
|
||||
// 下载并绑定Castile游戏角色
|
||||
Method: http.MethodGet,
|
||||
Path: "/bind_role",
|
||||
Handler: carv.DownloadAndBindRoleHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
// 注册绑定钱包任务
|
||||
Method: http.MethodGet,
|
||||
Path: "/bind_wallet",
|
||||
Handler: carv.BindWalletHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
// 每日钱包签到任务
|
||||
Method: http.MethodGet,
|
||||
Path: "/check_in_wallet",
|
||||
Handler: carv.WalletCheckInHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
// 游戏主线解锁第x章节
|
||||
Method: http.MethodGet,
|
||||
Path: "/unlock_chapter",
|
||||
Handler: carv.UnlockChapterHandler(serverCtx),
|
||||
},
|
||||
}...,
|
||||
),
|
||||
rest.WithPrefix("/gapi/carv"),
|
||||
)
|
||||
|
||||
server.AddRoutes(
|
||||
[]rest.Route{
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user