From 04dac3c5573ebcd9eb584a35736e48256737a03b Mon Sep 17 00:00:00 2001 From: Simen <simen_opedal@hotmail.com> Date: Mon, 14 Mar 2022 22:32:06 +0100 Subject: [PATCH] minor redirect changes --- frontend/www/contentcomments.html | 2 +- frontend/www/scripts/addcontent.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/www/contentcomments.html b/frontend/www/contentcomments.html index 72fd211..6871cbe 100644 --- a/frontend/www/contentcomments.html +++ b/frontend/www/contentcomments.html @@ -20,7 +20,7 @@ <p>Here you can post comments and like.</p> </div> <div class="col-lg-6"> - <input type="button" class="btn btn-primary" id="btn-like" value="Like"> + <input type="button" class="btn btn-success" id="btn-like" value="Like"> </div> <div class="col-lg-6"> diff --git a/frontend/www/scripts/addcontent.js b/frontend/www/scripts/addcontent.js index 06f338e..e1e79ab 100644 --- a/frontend/www/scripts/addcontent.js +++ b/frontend/www/scripts/addcontent.js @@ -6,8 +6,8 @@ function handleCancelButtonDuringCreate() { } /** - * This api request is fired when the user clicks the button to create a group - * It sends a POST request with the form data, and relocates to groups.html or + * This api request is fired when the user clicks the button to add content to a group + * It sends a POST request with the form data, and relocates to groupsContent page or * sends an error message in respons. */ async function addContent() { @@ -25,7 +25,7 @@ async function addContent() { let response = await sendRequest("POST", `${HOST}/api/content/`, body); if (response.ok) { - window.location.replace("groups.html"); + window.location.replace(`groupContent.html?id=${groupId}`); } else { let data = await response.json(); let alert = createAlert("Could not create new group!", data); -- GitLab