From 5116b06f2f9067b5499c187063ed37b35d755438 Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Sun, 25 Jun 2023 18:05:29 +0800 Subject: [PATCH] fix --- server/map-library/internal/logic/savemaplibrarylogic.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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)