Fixed websites query.
This commit is contained in:
@@ -59,7 +59,7 @@ export async function canViewWebsite({ user, shareToken }: Auth, websiteId: stri
|
||||
return !!(await findTeamWebsiteByUserId(websiteId, user.id));
|
||||
}
|
||||
|
||||
export async function canViewAllWebsite({ user }: Auth) {
|
||||
export async function canViewAllWebsites({ user }: Auth) {
|
||||
return user.isAdmin;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ export function salt() {
|
||||
return hash(secret(), ROTATING_SALT);
|
||||
}
|
||||
|
||||
export function uuid(...args: [any]) {
|
||||
export function uuid(...args: any) {
|
||||
if (!args.length) return v4();
|
||||
|
||||
return v5(hash(...args, salt()), v5.DNS);
|
||||
|
||||
Reference in New Issue
Block a user