feat(api,core,domain): Ключи для редис
This commit is contained in:
@@ -6,6 +6,7 @@ using PARR.API.Settings;
|
||||
using PARR.Core.Common.Interfaces;
|
||||
using PARR.Core.Repositories.Interfaces;
|
||||
using PARR.Core.Repositories.Interfaces.Unit;
|
||||
using PARR.Domain.Cache;
|
||||
using PARR.Domain.Common.Roles;
|
||||
using PARR.Domain.Settings;
|
||||
|
||||
@@ -162,13 +163,15 @@ namespace PARR.API.Services.Implementations
|
||||
private string GetBlockKey(string ipAddress)
|
||||
{
|
||||
// d - deny
|
||||
return $"d_{ipAddress}";
|
||||
//return $"d_{ipAddress}";
|
||||
return cacheService.GetKey(CacheKeys.UserAuth.Banned(ipAddress));
|
||||
}
|
||||
|
||||
private string GetAllowKey(string ipAddress)
|
||||
{
|
||||
// a - allow
|
||||
return $"a_{ipAddress}";
|
||||
//return $"a_{ipAddress}";
|
||||
return cacheService.GetKey(CacheKeys.UserAuth.Session(ipAddress));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user