nft质押任务逻辑
This commit is contained in:
@@ -33,6 +33,24 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
|
||||
server.AddRoutes(
|
||||
[]rest.Route{
|
||||
{
|
||||
// 质押NFT
|
||||
Method: http.MethodPost,
|
||||
Path: "/nft/stake",
|
||||
Handler: task.StakeNftHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
// 取消质押NFT
|
||||
Method: http.MethodPost,
|
||||
Path: "/nft/unstake",
|
||||
Handler: task.UnStakeNftHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
// 拉取玩家持有的nft列表
|
||||
Method: http.MethodGet,
|
||||
Path: "/nfts",
|
||||
Handler: task.GetNftListHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
// 领取任务奖励
|
||||
Method: http.MethodGet,
|
||||
@@ -45,6 +63,12 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
Path: "/task",
|
||||
Handler: task.VerifyTaskResultHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
// 质押任务详情
|
||||
Method: http.MethodGet,
|
||||
Path: "/task/stake",
|
||||
Handler: task.GetStakeTaskDetailHandler(serverCtx),
|
||||
},
|
||||
},
|
||||
rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
|
||||
rest.WithPrefix("/gapi/task/v1"),
|
||||
|
||||
Reference in New Issue
Block a user