增加:查询castile代币余额
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package transfercastile
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/zeromicro/go-zero/rest/httpx"
|
||||
"nova_task/internal/logic/transfercastile"
|
||||
"nova_task/internal/svc"
|
||||
)
|
||||
|
||||
// 查询castile代币余额
|
||||
func GetCastileBalanceHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
l := transfercastile.NewGetCastileBalanceLogic(r.Context(), svcCtx)
|
||||
resp, err := l.GetCastileBalance()
|
||||
if err != nil {
|
||||
httpx.ErrorCtx(r.Context(), w, err)
|
||||
} else {
|
||||
httpx.OkJsonCtx(r.Context(), w, resp)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user