This commit is contained in:
eson 2023-09-01 14:42:11 +08:00
parent 7ad02deeb1
commit 8bd52126fb

View File

@ -1,7 +1,6 @@
package logic
import (
"encoding/json"
"fmt"
"fusenapi/utils/auth"
"fusenapi/utils/basic"
@ -132,14 +131,15 @@ 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"].(string)), &querydata)
if err != nil {
logx.Error(err, info)
return resp.SetStatusWithMessage(basic.CodeApiErr, err.Error())
}
logx.Error(querydata)
for k, v := range querydata {
logx.Error(info)
// var querydata map[string]any = make(map[string]any)
// err = json.Unmarshal([]byte(info["querydata"].(string)), &querydata)
// if err != nil {
// logx.Error(err, info)
// return resp.SetStatusWithMessage(basic.CodeApiErr, err.Error())
// }
for k, v := range info {
metadict[k] = v
}
}