This commit is contained in:
@@ -23,7 +23,7 @@ namespace Auth.Controllers {
|
||||
public async Task<ActionResult<string>> Get(string JWT, string key) {
|
||||
Account? account = AuthJWT.ValidateJWTToken(JWT);
|
||||
if (account != null) {
|
||||
RedisValue result = await _redisdb.StringGetAsync( account.Site + key);
|
||||
RedisValue result = await _redisdb.StringGetAsync( account.ID + account.Site + key );
|
||||
return Ok(result.ToString());
|
||||
} else {
|
||||
return BadRequest("JWT Not Valid");
|
||||
@@ -35,7 +35,7 @@ namespace Auth.Controllers {
|
||||
public async Task<ActionResult> Set(string JWT, string key, string value) {
|
||||
Account? account = AuthJWT.ValidateJWTToken(JWT);
|
||||
if (account != null) {
|
||||
await _redisdb.StringSetAsync(account.Site + key, value);
|
||||
await _redisdb.StringSetAsync( account.ID + account.Site + key, value );
|
||||
return Ok();
|
||||
} else {
|
||||
return BadRequest("JWT Not Valid");
|
||||
|
||||
Reference in New Issue
Block a user