mirror of
https://github.com/documenso/documenso.git
synced 2025-11-22 20:51:33 +10:00
fix: qr code link undefined
This commit is contained in:
@ -116,6 +116,21 @@ export const run = async ({
|
||||
documentData.data = documentData.initialData;
|
||||
}
|
||||
|
||||
const existingToken = await prisma.documentAccessToken.findUnique({
|
||||
where: {
|
||||
documentId: document.id,
|
||||
},
|
||||
});
|
||||
|
||||
if (!existingToken) {
|
||||
await prisma.documentAccessToken.create({
|
||||
data: {
|
||||
token: nanoid(),
|
||||
documentId: document.id,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
const pdfData = await getFile(documentData);
|
||||
|
||||
const certificateData =
|
||||
@ -210,13 +225,6 @@ export const run = async ({
|
||||
},
|
||||
});
|
||||
|
||||
await tx.documentAccessToken.create({
|
||||
data: {
|
||||
token: nanoid(32),
|
||||
documentId: document.id,
|
||||
},
|
||||
});
|
||||
|
||||
await tx.documentAuditLog.create({
|
||||
data: createDocumentAuditLogData({
|
||||
type: DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_COMPLETED,
|
||||
|
||||
Reference in New Issue
Block a user