nft质押任务逻辑
This commit is contained in:
22
internal/handler/task/get_stake_task_detail_handler.go
Normal file
22
internal/handler/task/get_stake_task_detail_handler.go
Normal 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"
|
||||
)
|
||||
|
||||
// 质押任务详情
|
||||
func GetStakeTaskDetailHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
l := task.NewGetStakeTaskDetailLogic(r.Context(), svcCtx)
|
||||
resp, err := l.GetStakeTaskDetail()
|
||||
if err != nil {
|
||||
httpx.ErrorCtx(r.Context(), w, err)
|
||||
} else {
|
||||
httpx.OkJsonCtx(r.Context(), w, resp)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user