23 lines
500 B
Go
23 lines
500 B
Go
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)
|
|
}
|
|
}
|
|
}
|