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 {
|
if userinfo.GetIdType() != auth.IDTYPE_User {
|
||||||
return resp.SetStatusWithMessage(basic.CodeServiceErr, "please login first")
|
return resp.SetStatusWithMessage(basic.CodeServiceErr, "please login first")
|
||||||
}
|
}
|
||||||
bodyData, err := ioutil.ReadAll(req.Body)
|
bodyData, err := ioutil.ReadAll(r.Body)
|
||||||
defer req.Body.Close()
|
defer r.Body.Close()
|
||||||
var postData []types.SaveMapLibraryData
|
var postData []types.SaveMapLibraryData
|
||||||
if err = json.Unmarshal(bodyData, &postData); err != nil {
|
if err = json.Unmarshal(bodyData, &postData); err != nil {
|
||||||
logx.Error(err)
|
logx.Error(err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user