mirror of
https://github.com/documenso/documenso.git
synced 2025-11-23 21:21:37 +10:00
chore: add access token to all seal-document
This commit is contained in:
@ -116,13 +116,13 @@ export const run = async ({
|
||||
documentData.data = documentData.initialData;
|
||||
}
|
||||
|
||||
const existingToken = await prisma.documentAccessToken.findUnique({
|
||||
const existingDocumentAccessToken = await prisma.documentAccessToken.findUnique({
|
||||
where: {
|
||||
documentId: document.id,
|
||||
},
|
||||
});
|
||||
|
||||
if (!existingToken) {
|
||||
if (!existingDocumentAccessToken) {
|
||||
await prisma.documentAccessToken.create({
|
||||
data: {
|
||||
token: nanoid(),
|
||||
|
||||
Reference in New Issue
Block a user