Skip to content
Snippets Groups Projects
Commit 04dac3c5 authored by Simen's avatar Simen
Browse files

minor redirect changes

parent 144e3c75
No related branches found
No related tags found
1 merge request!4Feat/32 group content
Pipeline #162496 passed
......@@ -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">
......
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment