更新
This commit is contained in:
parent
9ffd7226f9
commit
4c8955168f
|
@ -72,6 +72,8 @@ func (m *FsUserInfoModel) getDefaultProfile(ctx context.Context, tname string) (
|
|||
return info, nil
|
||||
}
|
||||
|
||||
var versionML = "2"
|
||||
|
||||
func (m *FsUserInfoModel) GetProfile(ctx context.Context, pkey string, userId int64, guestId int64) (map[string]any, error) {
|
||||
|
||||
var baseinfo map[string]any
|
||||
|
@ -111,7 +113,19 @@ func (m *FsUserInfoModel) GetProfile(ctx context.Context, pkey string, userId in
|
|||
return m.getDefaultProfile(ctx, tname)
|
||||
}
|
||||
|
||||
if _, ok := info["logo_selected"]; !ok {
|
||||
if logoSelected, ok := info["logo_selected"]; ok {
|
||||
if version, ok := logoSelected.(map[string]any)["version"]; ok {
|
||||
if ver, ok := version.(string); ok {
|
||||
if ver != versionML {
|
||||
defaultUserInfo, err := m.getDefaultProfile(ctx, tname)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
info["logo_selected"] = defaultUserInfo["logo_selected"]
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
defaultUserInfo, err := m.getDefaultProfile(ctx, tname)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
Loading…
Reference in New Issue
Block a user