Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2026-03-18 23:59:32 +01:00
parent 239f201a93
commit 32cc4a4f9c
4 changed files with 35 additions and 69 deletions

View File

@@ -170,6 +170,7 @@ export const useCreateAudit = (connectionId: string) => {
validUntil?: string;
reportKey?: string;
state?: string;
file?: File | null;
}) => {
if (!input.organizationId) {
return alert(__("Failed to create audit: organization is required"));
@@ -188,9 +189,11 @@ export const useCreateAudit = (connectionId: string) => {
validUntil: input.validUntil,
reportKey: input.reportKey,
state: input.state || "NOT_STARTED",
file: input.file ? null : undefined,
},
connections: [connectionId],
},
...(input.file ? { uploadables: { "input.file": input.file } } : {}),
});
};
};