mirror of
https://github.com/umami-software/umami.git
synced 2026-02-07 22:27:16 +01:00
Reformatted files with biome.
This commit is contained in:
parent
d51f0641a6
commit
fa8d8055df
558 changed files with 2108 additions and 2379 deletions
|
|
@ -2,5 +2,5 @@ export * from './link';
|
|||
export * from './pixel';
|
||||
export * from './report';
|
||||
export * from './team';
|
||||
export * from './website';
|
||||
export * from './user';
|
||||
export * from './website';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Auth } from '@/lib/types';
|
||||
import { getLink, getTeamUser } from '@/queries/prisma';
|
||||
import { hasPermission } from '@/lib/auth';
|
||||
import { PERMISSIONS } from '@/lib/constants';
|
||||
import type { Auth } from '@/lib/types';
|
||||
import { getLink, getTeamUser } from '@/queries/prisma';
|
||||
|
||||
export async function canViewLink({ user }: Auth, linkId: string) {
|
||||
if (user?.isAdmin) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Auth } from '@/lib/types';
|
||||
import { getPixel, getTeamUser } from '@/queries/prisma';
|
||||
import { hasPermission } from '@/lib/auth';
|
||||
import { PERMISSIONS } from '@/lib/constants';
|
||||
import type { Auth } from '@/lib/types';
|
||||
import { getPixel, getTeamUser } from '@/queries/prisma';
|
||||
|
||||
export async function canViewPixel({ user }: Auth, pixelId: string) {
|
||||
if (user?.isAdmin) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { Auth } from '@/lib/types';
|
||||
import { Report } from '@/generated/prisma/client';
|
||||
import type { Report } from '@/generated/prisma/client';
|
||||
import type { Auth } from '@/lib/types';
|
||||
import { canViewWebsite } from './website';
|
||||
|
||||
export async function canViewReport(auth: Auth, report: Report) {
|
||||
|
|
@ -7,7 +7,7 @@ export async function canViewReport(auth: Auth, report: Report) {
|
|||
return true;
|
||||
}
|
||||
|
||||
if (auth.user.id == report.userId) {
|
||||
if (auth.user.id === report.userId) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -19,7 +19,7 @@ export async function canUpdateReport({ user }: Auth, report: Report) {
|
|||
return true;
|
||||
}
|
||||
|
||||
return user.id == report.userId;
|
||||
return user.id === report.userId;
|
||||
}
|
||||
|
||||
export async function canDeleteReport(auth: Auth, report: Report) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Auth } from '@/lib/types';
|
||||
import { PERMISSIONS } from '@/lib/constants';
|
||||
import { getTeamUser } from '@/queries/prisma';
|
||||
import { hasPermission } from '@/lib/auth';
|
||||
import { PERMISSIONS } from '@/lib/constants';
|
||||
import type { Auth } from '@/lib/types';
|
||||
import { getTeamUser } from '@/queries/prisma';
|
||||
|
||||
export async function canViewTeam({ user }: Auth, teamId: string) {
|
||||
if (user.isAdmin) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Auth } from '@/lib/types';
|
||||
import type { Auth } from '@/lib/types';
|
||||
|
||||
export async function canCreateUser({ user }: Auth) {
|
||||
return user.isAdmin;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { Auth } from '@/lib/types';
|
||||
import { PERMISSIONS } from '@/lib/constants';
|
||||
import { hasPermission } from '@/lib/auth';
|
||||
import { PERMISSIONS } from '@/lib/constants';
|
||||
import type { Auth } from '@/lib/types';
|
||||
import { getLink, getPixel, getTeamUser, getWebsite } from '@/queries/prisma';
|
||||
|
||||
export async function canViewWebsite({ user, shareToken }: Auth, websiteId: string) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue