Merge branch 'main' into release/2.0 (1.52.0, 1.52.1)
# Conflicts: # CHANGELOG.md # docs/HANDOVER.md
This commit is contained in:
@@ -101,7 +101,8 @@ export function BreachesPanel({ token }: { token: string }) {
|
||||
setBusy(true);
|
||||
setError(null);
|
||||
try {
|
||||
if (id === "new") await apiV2Data("post", "/privacy/breaches", { authToken: token, body });
|
||||
// A new breach always comes from the full form (save below), so the required fields are there.
|
||||
if (id === "new") await apiV2Data("post", "/privacy/breaches", { authToken: token, body: body as { title: string; description: string; dataAffected: string; discoveredAt: string } });
|
||||
else await apiV2Data("put", "/privacy/breaches/{id}", { params: { id: id }, authToken: token, body });
|
||||
setEditing(null);
|
||||
await load();
|
||||
|
||||
Reference in New Issue
Block a user