mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 00:03:33 +10:00
feat: redirect signed document to completed page
This commit is contained in:
committed by
Mythie
parent
abfa0812f0
commit
b747334383
@ -1,4 +1,4 @@
|
||||
import { notFound } from 'next/navigation';
|
||||
import { notFound, redirect } from 'next/navigation';
|
||||
|
||||
import { match } from 'ts-pattern';
|
||||
|
||||
@ -45,7 +45,11 @@ export default async function SigningPage({ params: { token } }: SigningPageProp
|
||||
return notFound();
|
||||
}
|
||||
|
||||
const { documentData } = document;
|
||||
if (document?.status === 'COMPLETED') {
|
||||
redirect(`/sign/${token}/complete`);
|
||||
}
|
||||
|
||||
const user = await getServerComponentSession();
|
||||
|
||||
const documentDataUrl = await getFile(documentData)
|
||||
.then((buffer) => Buffer.from(buffer).toString('base64'))
|
||||
|
||||
Reference in New Issue
Block a user