diff --git a/server/map-library/internal/logic/savemaplibrarylogic.go b/server/map-library/internal/logic/savemaplibrarylogic.go index 819e3ac1..48ae27ad 100644 --- a/server/map-library/internal/logic/savemaplibrarylogic.go +++ b/server/map-library/internal/logic/savemaplibrarylogic.go @@ -31,12 +31,12 @@ func NewSaveMapLibraryLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Sa } } -func (l *SaveMapLibraryLogic) SaveMapLibrary(userinfo *auth.UserInfo, req *http.Request) (resp *basic.Response) { +func (l *SaveMapLibraryLogic) SaveMapLibrary(userinfo *auth.UserInfo, r *http.Request) (resp *basic.Response) { if userinfo.GetIdType() != auth.IDTYPE_User { return resp.SetStatusWithMessage(basic.CodeServiceErr, "please login first") } - bodyData, err := ioutil.ReadAll(req.Body) - defer req.Body.Close() + bodyData, err := ioutil.ReadAll(r.Body) + defer r.Body.Close() var postData []types.SaveMapLibraryData if err = json.Unmarshal(bodyData, &postData); err != nil { logx.Error(err)