Files
hldrCenter/server/internal/social_service/handler/socialService/updatesocialservicehandler.go

32 lines
863 B
Go
Raw Normal View History

2025-10-29 11:33:13 +08:00
// Code scaffolded by goctl. Safe to edit.
// goctl 1.9.2
package socialService
import (
"net/http"
2025-10-29 11:42:09 +08:00
"github.com/JACKYMYPERSON/hldrCenter/config"
2025-10-29 11:33:13 +08:00
"github.com/JACKYMYPERSON/hldrCenter/internal/social_service/internal/logic/socialService"
"github.com/JACKYMYPERSON/hldrCenter/internal/social_service/internal/types"
"github.com/zeromicro/go-zero/rest/httpx"
)
2025-10-29 11:42:09 +08:00
func UpdateSocialServiceHandler(cfg *config.Config) http.HandlerFunc {
2025-10-29 11:33:13 +08:00
return func(w http.ResponseWriter, r *http.Request) {
var req types.UpdateSocialServiceReq
if err := httpx.Parse(r, &req); err != nil {
httpx.ErrorCtx(r.Context(), w, err)
return
}
l := socialService.NewUpdateSocialServiceLogic(r.Context(), svcCtx)
resp, err := l.UpdateSocialService(&req)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}
}
}