fix code #12

Merged
nguyenphamquangtue merged 1 commits from feature/merchant into master 2022-10-06 02:15:20 +00:00
1 changed files with 6 additions and 2 deletions
Showing only changes of commit f41786dd27 - Show all commits

8
cache/role.go vendored
View File

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