mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-18 08:29:14 +00:00
fix(tokens-repo): raise token not found when deleting nonexistent token
even if device name exists
This commit is contained in:
parent
95e200bfc5
commit
bf6c230ae0
|
@ -39,6 +39,8 @@ class RedisTokensRepository(AbstractTokensRepository):
|
|||
"""Delete the token"""
|
||||
r = self.connection
|
||||
key = RedisTokensRepository._token_redis_key(input_token)
|
||||
if input_token not in self.get_tokens():
|
||||
raise TokenNotFound
|
||||
r.delete(key)
|
||||
|
||||
def reset(self):
|
||||
|
|
Loading…
Reference in a new issue