Merge branch 'master' into db-merge-test

This commit is contained in:
Sammy-T 2023-01-26 20:46:09 -05:00
commit 00a7272ec7
44 changed files with 3303 additions and 228 deletions

View file

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