mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 00:03:33 +10:00
feat: generate metatags for share page with og image
This commit is contained in:
committed by
Mythie
parent
96264f67e4
commit
f2da49d0e8
18
packages/lib/server-only/share/get-share-id.ts
Normal file
18
packages/lib/server-only/share/get-share-id.ts
Normal file
@ -0,0 +1,18 @@
|
||||
import { prisma } from '@documenso/prisma';
|
||||
|
||||
export interface GetSharingIdOptions {
|
||||
shareId: string;
|
||||
}
|
||||
|
||||
export const getSharingId = async ({ shareId }: GetSharingIdOptions) => {
|
||||
const result = await prisma.share.findUnique({
|
||||
where: {
|
||||
link: shareId,
|
||||
},
|
||||
include: {
|
||||
recipent: true,
|
||||
},
|
||||
});
|
||||
|
||||
return result;
|
||||
};
|
||||
Reference in New Issue
Block a user