Refactor authentication and token handling.

This commit is contained in:
Mike Cao 2022-11-08 22:58:52 -08:00
parent 1a8c7c42f4
commit 67732b9b5a
7 changed files with 50 additions and 70 deletions

View file

@ -8,7 +8,7 @@ export default async (req, res) => {
if (req.method === 'POST') {
if (redis.enabled) {
await redis.del(`auth:${getAuthToken(req)}`);
await redis.del(getAuthToken(req));
}
return ok(res);