Skip to content

Commit

Permalink
find audit when deleting image from transverse page (#898)
Browse files Browse the repository at this point in the history
  • Loading branch information
bellangerq authored Dec 6, 2024
1 parent 7fcd161 commit da040f2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion confiture-rest-api/src/audits/audit.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,14 @@ export class AuditService {
});

const storedFile = await storedFilePromise;
const audit = await storedFilePromise.criterionResult().page().audit();

const page = await storedFilePromise.criterionResult().page();

// Checks whether its a user page or transverse page
const audit =
page.url === ""
? await storedFilePromise.criterionResult().page().auditTransverse()
: await storedFilePromise.criterionResult().page().audit();

if (!audit || audit.editUniqueId !== editUniqueId) {
return false;
Expand Down

0 comments on commit da040f2

Please sign in to comment.