mirror of
https://github.com/documenso/documenso
synced 2026-05-24 09:28:27 +00:00
feat: redirect signed document to completed page
This commit is contained in:
parent
abfa0812f0
commit
b747334383
1 changed files with 6 additions and 2 deletions
|
|
@ -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'))
|
||||
|
|
|
|||
Loading…
Reference in a new issue