From 0d5cb2836d55e05ae2d3b9e22d045b4572f42a9b Mon Sep 17 00:00:00 2001
From: hollum <hollum@hotmail.com>
Date: Thu, 3 Mar 2022 10:08:06 +0100
Subject: [PATCH] get single user

---
 frontend/www/scripts/profile.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/frontend/www/scripts/profile.js b/frontend/www/scripts/profile.js
index 27da90c..ef93e5f 100644
--- a/frontend/www/scripts/profile.js
+++ b/frontend/www/scripts/profile.js
@@ -83,9 +83,10 @@ async function createExercise() {
 
     const username = sessionStorage.getItem("username");
     console.log("USERNAME:", username);
-    let response2 = await sendRequest("GET", `${HOST}/api/users/`);
+    let response2 = await sendRequest("GET", `${HOST}/api/users/${username}/`);
     let data2 = await response2.json();
-    console.log("USER:", data2.results.map((item) => console.log(item)));
+    console.log("*USER", data2)
+    //console.log("USER:", data2.results.map((item) => console.log(item)));
 }
 
 function handleEditExerciseButtonClick() {
-- 
GitLab