From 4255d22c2ad9f7f17f0d95a09b84351b8486989e Mon Sep 17 00:00:00 2001 From: Christof Steyn <56771007+P3TROOS@users.noreply.github.com> Date: Sat, 21 Oct 2023 17:52:08 +0200 Subject: [PATCH] Fixed create request alert --- .../src/components/Subsystems/useRequestMaker.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/infosafe_frontend/src/components/Subsystems/useRequestMaker.js b/frontend/infosafe_frontend/src/components/Subsystems/useRequestMaker.js index 5b07b408..5fd2506b 100644 --- a/frontend/infosafe_frontend/src/components/Subsystems/useRequestMaker.js +++ b/frontend/infosafe_frontend/src/components/Subsystems/useRequestMaker.js @@ -75,10 +75,11 @@ const useRequestMaker = () => { body: JSON.stringify(requestBody) }).then(() => { console.log("New request added"); - window.alert("Successfully created " + requestBody + "request."); + console.log(requestBody); + window.alert("Successfully created " + requestBody.support_type + " request."); }) .catch((error) => { - window.alert("Couldn't created " + requestBody + "request. Possible duplicate request."); + window.alert("Couldn't create " + requestBody.support_type + " request. Possible duplicate request."); }) };