fix
This commit is contained in:
parent
15eb99d975
commit
5116b06f2f
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user