mirror of
https://github.com/umami-software/umami.git
synced 2026-02-06 13:47:15 +01:00
share api, queries, permissions, migration, entity lib
Some checks are pending
Node.js CI / build (push) Waiting to run
Some checks are pending
Node.js CI / build (push) Waiting to run
This commit is contained in:
parent
a270b0afea
commit
29f2c7b7d4
11 changed files with 256 additions and 23 deletions
11
src/lib/entity.ts
Normal file
11
src/lib/entity.ts
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import { getLink, getPixel, getWebsite } from '@/queries/prisma';
|
||||
|
||||
export async function getEntity(entityId: string) {
|
||||
const website = await getWebsite(entityId);
|
||||
const link = await getLink(entityId);
|
||||
const pixel = await getPixel(entityId);
|
||||
|
||||
const entity = website || link || pixel;
|
||||
|
||||
return entity;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue