mirror of
https://github.com/documenso/documenso.git
synced 2025-11-18 02:32:00 +10:00
✨ 🗃️ expires signign request after 60 days
This commit is contained in:
@ -23,11 +23,19 @@ export const sendSigningRequest = async (
|
||||
).catch((err) => {
|
||||
throw err;
|
||||
});
|
||||
|
||||
const expiryDate = new Date();
|
||||
expiryDate.setDate(expiryDate.getDate() + 60);
|
||||
|
||||
await prisma.recipient.update({
|
||||
where: {
|
||||
id: recipient.id,
|
||||
},
|
||||
data: { sendStatus: SendStatus.SENT, readStatus: ReadStatus.NOT_OPENED },
|
||||
data: {
|
||||
sendStatus: SendStatus.SENT,
|
||||
readStatus: ReadStatus.NOT_OPENED,
|
||||
expired: expiryDate,
|
||||
},
|
||||
});
|
||||
|
||||
await prisma.document.update({
|
||||
|
||||
@ -91,6 +91,7 @@ model Recipient {
|
||||
email String @db.VarChar(255)
|
||||
name String @default("") @db.VarChar(255)
|
||||
token String
|
||||
expired DateTime?
|
||||
readStatus ReadStatus @default(NOT_OPENED)
|
||||
signingStatus SigningStatus @default(NOT_SIGNED)
|
||||
sendStatus SendStatus @default(NOT_SENT)
|
||||
|
||||
Reference in New Issue
Block a user