Fix issue with sendBeacon request.

This commit is contained in:
Mike Cao committed 2022-03-10 19:01:33 -08:00
1 parent 48db7708de
commit 17790aa5a8
6 files changed
+23 -22

No files matched your search

+2 -2
View File
@@ -1,9 +1,9 @@
import { getWebsiteByUuid, getSessionByUuid, createSession } from 'lib/queries';
import { getClientInfo } from 'lib/request';
import { getJsonBody, getClientInfo } from 'lib/request';
import { uuid, isValidUuid, parseToken } from 'lib/crypto';
export async function getSession(req) {
const { payload } = req.body;
const { payload } = getJsonBody(req);
if (!payload) {
throw new Error('Invalid request');