fix: tidy code and update endpoints

This commit is contained in:
Mythie
2023-09-21 00:51:02 +00:00
parent 8df5304b8e
commit 15fd819132
19 changed files with 365 additions and 154 deletions

View File

@ -0,0 +1,13 @@
import { prisma } from '@documenso/prisma';
export type GetShareLinkBySlugOptions = {
slug: string;
};
export const getShareLinkBySlug = async ({ slug }: GetShareLinkBySlugOptions) => {
return await prisma.documentShareLink.findFirstOrThrow({
where: {
slug,
},
});
};