28 lines
618 B
Go
28 lines
618 B
Go
package carv
|
|
|
|
import (
|
|
"net/http"
|
|
"nova_task/internal/pkg/errs"
|
|
|
|
"github.com/zeromicro/go-zero/rest/httpx"
|
|
"nova_task/internal/logic/carv"
|
|
"nova_task/internal/svc"
|
|
"nova_task/internal/types"
|
|
)
|
|
|
|
// 每日钱包签到任务
|
|
func WalletCheckInHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
|
return func(w http.ResponseWriter, r *http.Request) {
|
|
var req types.EmailKey
|
|
ctx := r.Context()
|
|
if err := httpx.Parse(r, &req); err != nil {
|
|
httpx.ErrorCtx(ctx, w, err)
|
|
return
|
|
}
|
|
|
|
l := carv.NewWalletCheckInLogic(ctx, svcCtx)
|
|
resp := l.WalletCheckIn(&req)
|
|
errs.WriteHttpResponse(ctx, w, resp)
|
|
}
|
|
}
|