feat: add a feature for redirecting users on signing

Signed-off-by: Adithya Krishna <adi@documenso.com>
This commit is contained in:
Adithya Krishna
2024-01-31 18:17:43 +05:30
parent 3541a805e5
commit f4c24fd944
7 changed files with 37 additions and 6 deletions

View File

@ -9,6 +9,7 @@ export type CreateDocumentMetaOptions = {
timezone?: string;
password?: string;
dateFormat?: string;
redirectUrl?: string;
userId: number;
};
@ -20,6 +21,7 @@ export const upsertDocumentMeta = async ({
documentId,
userId,
password,
redirectUrl,
}: CreateDocumentMetaOptions) => {
await prisma.document.findFirstOrThrow({
where: {
@ -35,17 +37,19 @@ export const upsertDocumentMeta = async ({
create: {
subject,
message,
password,
dateFormat,
timezone,
password,
documentId,
redirectUrl,
},
update: {
subject,
message,
dateFormat,
password,
dateFormat,
timezone,
redirectUrl,
},
});
};