Skip to content

Commit

Permalink
fix: catch exceptions in formulaire
Browse files Browse the repository at this point in the history
  • Loading branch information
achauve committed Dec 13, 2023
1 parent b65f169 commit cdac8e1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion formulaire/pages/api/dossier/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const remove: NextApiHandler = async (req, res) => {

const url = `${process.env.API_URL_INSTRUCTEUR}/inc/dossiers/${dossierId}`;

const fetching = fetch(url, {
const fetching = await fetch(url, {
body: JSON.stringify({ api_key: process.env.API_KEY_SDP }),
method: "DELETE",
}).then(async (r) => {
Expand Down
2 changes: 1 addition & 1 deletion formulaire/pages/api/enfants/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const remove: NextApiHandler = async (req, res) => {

const url = `${process.env.API_URL_INSTRUCTEUR}/inc/enfant/${enfantId}`;

const fetching = fetch(url, {
const fetching = await fetch(url, {
body: JSON.stringify({ api_key: process.env.API_KEY_SDP }),
method: "DELETE",
}).then(async (r) => {
Expand Down

0 comments on commit cdac8e1

Please sign in to comment.