Skip to content
Snippets Groups Projects
Commit 896cb1e5 authored by Nigel  Sahl's avatar Nigel Sahl
Browse files

update little part

parent 14fc0445
Branches
Tags
No related merge requests found
...@@ -44,7 +44,6 @@ function editGymCall() { ...@@ -44,7 +44,6 @@ function editGymCall() {
xhr.onreadystatechange = function () { xhr.onreadystatechange = function () {
if (this.readyState === 4) { if (this.readyState === 4) {
if (this.status === 200) { if (this.status === 200) {
console.log("hh22");
window.location.reload(); window.location.reload();
} else { } else {
const json = JSON.parse(this.responseText); const json = JSON.parse(this.responseText);
......
...@@ -18,16 +18,16 @@ function createRatingCard(rating) { ...@@ -18,16 +18,16 @@ function createRatingCard(rating) {
function modifyGymRateList(data, username) { function modifyGymRateList(data, username) {
const loadingRatings = document.getElementById("loading-ratings"); const loadingRatings = document.getElementById("loading-ratings");
loadingRatings.innerHTML = ""; loadingRatings.innerHTML = "";
const ratingCount = 0; let ratingCount = 0;
data.forEach((rating) => { data.forEach((rating) => {
if (rating.username != username) { if (rating.username != username) {
createRatingCard(rating); createRatingCard(rating);
ratingCount++; ratingCount++;
} }
}); });
if (ratingCount <= 0) { if (ratingCount <= 0) {
loadingRatings.innerHTML = "No ratings from other user's yet!"; loadingRatings.innerHTML = "No ratings from other user's yet!";
} }
} }
function getRatings(gymId, username) { function getRatings(gymId, username) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment