This commit is contained in:
eson 2023-09-01 14:27:51 +08:00
parent dca5011ec1
commit 3becece63c

View File

@ -1,7 +1,6 @@
package logic
import (
"encoding/json"
"fmt"
"fusenapi/utils/auth"
"fusenapi/utils/basic"
@ -140,14 +139,14 @@ func (l *InfoLogic) Info(req *types.UserInfoRequest, userinfo *auth.UserInfo) (r
return resp.SetStatusWithMessage(basic.CodeApiErr, err.Error())
}
var querydata map[string]any = make(map[string]any)
err = json.Unmarshal([]byte(info.QueryData), &querydata)
if err != nil {
logx.Error(err, info)
return resp.SetStatusWithMessage(basic.CodeApiErr, err.Error()+":"+string(info.QueryData))
}
// var querydata map[string]any = make(map[string]any)
// err = json.Unmarshal([]byte(info.QueryData), &querydata)
// if err != nil {
// logx.Error(err, info)
// return resp.SetStatusWithMessage(basic.CodeApiErr, err.Error()+":"+string(info.QueryData))
// }
for k, v := range querydata {
for k, v := range info {
metadict[k] = v
}
}