fix: tidy code and update endpoints

This commit is contained in:
Mythie
2023-09-21 00:51:02 +00:00
parent bcb163693a
commit 4b13a42731
19 changed files with 344 additions and 151 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,
},
});
};