|
@@ -7,7 +7,6 @@ import (
|
|
|
|
|
|
"wechat-api/internal/logic/contact_field_template"
|
|
|
"wechat-api/internal/svc"
|
|
|
- "wechat-api/internal/types"
|
|
|
)
|
|
|
|
|
|
// swagger:route post /contact_field_template contact_field_template GetContactFieldTemplateById
|
|
@@ -16,25 +15,13 @@ import (
|
|
|
//
|
|
|
// Get contact_field_template by ID | 通过ID获取 ContactFieldTemplate
|
|
|
//
|
|
|
-// Parameters:
|
|
|
-// + name: body
|
|
|
-// require: true
|
|
|
-// in: body
|
|
|
-// type: IDReq
|
|
|
-//
|
|
|
// Responses:
|
|
|
// 200: ContactFieldTemplateInfoResp
|
|
|
|
|
|
func GetContactFieldTemplateByIdHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
|
|
return func(w http.ResponseWriter, r *http.Request) {
|
|
|
- var req types.IDReq
|
|
|
- if err := httpx.Parse(r, &req, true); err != nil {
|
|
|
- httpx.ErrorCtx(r.Context(), w, err)
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
l := contact_field_template.NewGetContactFieldTemplateByIdLogic(r.Context(), svcCtx)
|
|
|
- resp, err := l.GetContactFieldTemplateById(&req)
|
|
|
+ resp, err := l.GetContactFieldTemplateById()
|
|
|
if err != nil {
|
|
|
httpx.ErrorCtx(r.Context(), w, err)
|
|
|
} else {
|