Use portal for modals. Prisma disconnect after query.

This commit is contained in:
Mike Cao 2020-08-18 23:35:26 -07:00
parent 774a7dfdbc
commit d4ca02f110
5 changed files with 14 additions and 12 deletions

View file

@ -10,12 +10,13 @@ export async function verifySession(req) {
}
const { website: website_uuid, hostname, screen, language, session } = payload;
const token = await parseToken(session);
if (!isValidId(website_uuid)) {
throw new Error(`Invalid website: ${website_uuid}`);
}
const token = await parseToken(session);
if (!token || token.website_uuid !== website_uuid) {
const { userAgent, browser, os, ip, country, device } = await getClientInfo(req, payload);