2025-01-20 01:55:44 +08:00

29 lines
708 B
Go

package app_user
import (
"net/http"
"github.com/zeromicro/go-zero/rest/httpx"
"youtu_server/game_open_api/internal/logic/app_user"
"youtu_server/game_open_api/internal/svc"
"youtu_server/game_open_api/internal/types"
)
func AppUserSetUserHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.SetAppUserRequest
if err := httpx.Parse(r, &req); err != nil {
httpx.ErrorCtx(r.Context(), w, err)
return
}
l := app_user.NewAppUserSetUserLogic(r.Context(), svcCtx)
resp, err := l.AppUserSetUser(&req)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}
}
}