Merge pull request #12 from Selly-Modules/feature/merchant

fix code
This commit is contained in:
nguyenphamquangtue 2022-10-06 09:15:20 +07:00 committed by GitHub
commit 7a268b4027
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 {
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