mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
change const
This commit is contained in:
parent
689b732829
commit
075d77abac
3 changed files with 5 additions and 5 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import { parseSecureToken, parseToken } from 'next-basics';
|
||||
import { getUser, getWebsite } from 'queries';
|
||||
import debug from 'debug';
|
||||
import { SHARE_TOKEN_HEADER, TYPE_ACCOUNT, TYPE_WEBSITE } from 'lib/constants';
|
||||
import { SHARE_TOKEN_HEADER, TYPE_USER, TYPE_WEBSITE } from 'lib/constants';
|
||||
import { secret } from 'lib/crypto';
|
||||
|
||||
const log = debug('umami:auth');
|
||||
|
|
@ -58,7 +58,7 @@ export async function allowQuery(req, type) {
|
|||
const website = await getWebsite({ id });
|
||||
|
||||
return website && website.userId === userId;
|
||||
} else if (type === TYPE_ACCOUNT) {
|
||||
} else if (type === TYPE_USER) {
|
||||
const user = await getUser({ id });
|
||||
|
||||
return user && user.id === id;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ export const REALTIME_RANGE = 30;
|
|||
export const REALTIME_INTERVAL = 3000;
|
||||
|
||||
export const TYPE_WEBSITE = 'website';
|
||||
export const TYPE_ACCOUNT = 'user';
|
||||
export const TYPE_USER = 'user';
|
||||
|
||||
export const THEME_COLORS = {
|
||||
light: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue