This commit is contained in:
Tue 2022-10-06 09:14:45 +07:00
parent b80e8054d5
commit f41786dd27
1 changed files with 6 additions and 2 deletions

8
cache/role.go vendored
View File

@ -42,7 +42,9 @@ func Roles() {
} }
if err := SetKeyValue(role.ID.Hex(), entry, 0); err != nil { if err := SetKeyValue(role.ID.Hex(), entry, 0); err != nil {
logger.Error("usermngmt - CacheRole", logger.LogData{ logger.Error("usermngmt - CacheRole", logger.LogData{
"err": err.Error(), Source: "usermngmt.cache.Roles",
Message: err.Error(),
Data: entry,
}) })
return return
} }
@ -65,7 +67,9 @@ func GetCachedRole(key string) CachedRole {
var cachedRole CachedRole var cachedRole CachedRole
if err := json.Unmarshal(value, &cachedRole); err != nil { if err := json.Unmarshal(value, &cachedRole); err != nil {
logger.Error("usermngmt - GetCachedRole - Unmarshal", logger.LogData{ logger.Error("usermngmt - GetCachedRole - Unmarshal", logger.LogData{
"err": err.Error(), Source: "usermngmt.cache.GetCachedRole",
Message: err.Error(),
Data: cachedRole,
}) })
} }
return cachedRole return cachedRole