mirror of
https://github.com/umami-software/umami.git
synced 2026-02-12 00:27:11 +01:00
Initial Typescript models.
This commit is contained in:
parent
04e9f06e93
commit
0aaba8cbd1
74 changed files with 1144 additions and 768 deletions
13
queries/admin/website/getUserWebsites.ts
Normal file
13
queries/admin/website/getUserWebsites.ts
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import prisma from 'lib/prisma';
|
||||
import { Website } from '@prisma/client';
|
||||
|
||||
export async function getUserWebsites(userId): Promise<Website[]> {
|
||||
return prisma.client.website.findMany({
|
||||
where: {
|
||||
userId,
|
||||
},
|
||||
orderBy: {
|
||||
name: 'asc',
|
||||
},
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue