2025-10-30 09:59:40 +08:00
|
|
|
// Code scaffolded by goctl. Safe to edit.
|
|
|
|
|
// goctl 1.9.2
|
|
|
|
|
|
|
|
|
|
package socialServiceInternship
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"net/http"
|
|
|
|
|
|
2025-10-30 10:05:35 +08:00
|
|
|
"github.com/JACKYMYPERSON/hldrCenter/config"
|
2025-10-30 09:59:40 +08:00
|
|
|
"github.com/JACKYMYPERSON/hldrCenter/internal/social_service_internship/internal/logic/socialServiceInternship"
|
|
|
|
|
"github.com/JACKYMYPERSON/hldrCenter/internal/social_service_internship/internal/types"
|
|
|
|
|
"github.com/zeromicro/go-zero/rest/httpx"
|
|
|
|
|
)
|
|
|
|
|
|
2025-10-30 10:05:35 +08:00
|
|
|
func UpdateSocialServiceInternshipHandler(cfg *config.Config) http.HandlerFunc {
|
2025-10-30 09:59:40 +08:00
|
|
|
return func(w http.ResponseWriter, r *http.Request) {
|
|
|
|
|
var req types.UpdateSocialServiceInternshipReq
|
|
|
|
|
if err := httpx.Parse(r, &req); err != nil {
|
|
|
|
|
httpx.ErrorCtx(r.Context(), w, err)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
l := socialServiceInternship.NewUpdateSocialServiceInternshipLogic(r.Context(), svcCtx)
|
|
|
|
|
resp, err := l.UpdateSocialServiceInternship(&req)
|
|
|
|
|
if err != nil {
|
|
|
|
|
httpx.ErrorCtx(r.Context(), w, err)
|
|
|
|
|
} else {
|
|
|
|
|
httpx.OkJsonCtx(r.Context(), w, resp)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|