Initial Typescript models.

This commit is contained in:
Brian Cao committed 2022-11-15 13:21:14 -08:00
1 parent 04e9f06e93
commit 0aaba8cbd1
74 files changed
+1144 -768

No files matched your search

+13
View 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',
},
});
}