Update website fetch and update.

This commit is contained in:
Mike Cao 2022-11-02 15:45:47 -07:00
parent 05245ca316
commit 1075325ec5
5 changed files with 27 additions and 59 deletions

View file

@ -43,7 +43,7 @@ export function isValidToken(token, validation) {
export async function allowQuery(req, type) {
const { id } = req.query;
const { userId, isAdmin, shareToken } = req.auth ?? {};
const { id: userId, isAdmin, shareToken } = req.auth ?? {};
if (isAdmin) {
return true;