From e6db665cc441365a821a233fb2aed075bc4fa170 Mon Sep 17 00:00:00 2001 From: Evelina Berg Date: Mon, 18 Jan 2021 22:16:35 +0100 Subject: [PATCH] Fixed url to likes endpoint --- code/src/components/ThoughtList.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/src/components/ThoughtList.js b/code/src/components/ThoughtList.js index b781242c0..08418eba6 100644 --- a/code/src/components/ThoughtList.js +++ b/code/src/components/ThoughtList.js @@ -20,7 +20,7 @@ export const ThoughtList = ({ thoughts, setThoughts }) => { }; const onLikedThought = (id) => { - fetch(`${THOUGHTS_URL}/${id}/like`, { + fetch(`${THOUGHTS_URL}/${id}/likes`, { method: 'POST', body: '', headers: { 'Content-Type': 'application/json' }