Skip to content

Commit

Permalink
change based on saidi comments #2200
Browse files Browse the repository at this point in the history
  • Loading branch information
numew committed Mar 7, 2024
1 parent c52f42f commit c1e8cc3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion assets/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ import './controllers/cookie_banner';
import './controllers/maintenance_banner';
import './controllers/activate_account/activate_account';
import './controllers/back_signalement_edit_file/back_signalement_edit_file';
import './controllers/back_signalement_view/back_signalement_view';
import './controllers/back_signalement_view/form_upload_documents';
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ if (modalUploadFiles) {
button.closest('.fr-grid-row').remove()
return true
}
fetch(button.href)
fetch(button.href, { method: 'DELETE' })
.then((response) => response.json())
.then((data) => {
if (data.success) {
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Back/SignalementFileController.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public function deleteFileSignalement(
return $this->json(['response' => 'error'], Response::HTTP_BAD_REQUEST);
}

#[Route('/file/delete-tmp/{id}', name: 'back_signalement_delete_tmpfile')]
#[Route('/file/delete-tmp/{id}', name: 'back_signalement_delete_tmpfile', methods: ['DELETE'])]
public function deleteTmpFile(
File $file,
EntityManagerInterface $entityManager,
Expand Down

0 comments on commit c1e8cc3

Please sign in to comment.