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