Handle website delete. Added response helper functions.
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import { parse } from 'cookie';
|
||||
import { verifySecureToken } from './crypto';
|
||||
import { parseSecureToken } from './crypto';
|
||||
import { AUTH_COOKIE_NAME } from './constants';
|
||||
|
||||
export async function verifyAuthToken(req) {
|
||||
const token = parse(req.headers.cookie || '')[AUTH_COOKIE_NAME];
|
||||
|
||||
return verifySecureToken(token);
|
||||
return parseSecureToken(token);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user