nft质押任务逻辑

This commit is contained in:
lianghuanjie
2024-12-27 18:06:13 +08:00
parent a22f73df20
commit 31a674080d
39 changed files with 1532 additions and 99 deletions

View File

@@ -0,0 +1,22 @@
package task
import (
"net/http"
"github.com/zeromicro/go-zero/rest/httpx"
"nova_task/internal/logic/task"
"nova_task/internal/svc"
)
// 拉取玩家持有的nft列表
func GetNftListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
l := task.NewGetNftListLogic(r.Context(), svcCtx)
resp, err := l.GetNftList()
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}
}
}