32 lines
1004 B
Go
32 lines
1004 B
Go
|
|
// Code scaffolded by goctl. Safe to edit.
|
||
|
|
// goctl 1.9.2
|
||
|
|
|
||
|
|
package socialServiceInternship
|
||
|
|
|
||
|
|
import (
|
||
|
|
"net/http"
|
||
|
|
|
||
|
|
"github.com/JACKYMYPERSON/hldrCenter/internal/social_service_internship/internal/logic/socialServiceInternship"
|
||
|
|
"github.com/JACKYMYPERSON/hldrCenter/internal/social_service_internship/internal/svc"
|
||
|
|
"github.com/JACKYMYPERSON/hldrCenter/internal/social_service_internship/internal/types"
|
||
|
|
"github.com/zeromicro/go-zero/rest/httpx"
|
||
|
|
)
|
||
|
|
|
||
|
|
func UpdateSocialServiceInternshipHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||
|
|
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)
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|