diff --git a/js/models.js b/js/models.js index 87f74a0..d7da19c 100644 --- a/js/models.js +++ b/js/models.js @@ -185,19 +185,19 @@ class User { async insertStoryIntoFavorites(story) { const response = await axios({ - url: `${BASE_URL}/${username}/favorites/${story.storyId}`, + url: `${BASE_URL}/users/${currentUser.username}/favorites/${story.storyId}`, method: "POST", - data: { token: `${username.loginToken}` } + data: { token: `${currentUser.loginToken}` } }); console.log("our response from the api post ...", response); - currentUser.favorites.push(story); + // currentUser.favorites.push(story); console.log("what's inside my favorite list... ", currentUser.favorites); } - /** second mehtod */ + /** second method */