增加修正nft质押者接口
This commit is contained in:
22
internal/handler/admin/fix_nft_staker_handler.go
Normal file
22
internal/handler/admin/fix_nft_staker_handler.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package admin
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/zeromicro/go-zero/rest/httpx"
|
||||
"nova_task/internal/logic/admin"
|
||||
"nova_task/internal/svc"
|
||||
)
|
||||
|
||||
// 修正 NFT 质押者
|
||||
func FixNftStakerHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
l := admin.NewFixNftStakerLogic(r.Context(), svcCtx)
|
||||
err := l.FixNftStaker()
|
||||
if err != nil {
|
||||
httpx.ErrorCtx(r.Context(), w, err)
|
||||
} else {
|
||||
httpx.Ok(w)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user