From d5d9a49ac3c614e6c768a870f01935ac26dc3638 Mon Sep 17 00:00:00 2001 From: Rushil Umaretiya Date: Sun, 28 Mar 2021 11:37:15 -0400 Subject: [PATCH] feat: finished connecting backend and frontend! --- frontend/src/components/Post.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/Post.js b/frontend/src/components/Post.js index 1111cd6..1223ef2 100644 --- a/frontend/src/components/Post.js +++ b/frontend/src/components/Post.js @@ -61,7 +61,7 @@ const Post = (props) => { }, body: JSON.stringify({ postid: props.id }), }; - fetch(`${process.env.REACT_APP_API_ENDPOINT}/postcomment`, requestOptions) + fetch(`${process.env.REACT_APP_API_ENDPOINT}/post/comments`, requestOptions) .then((response) => response.json()) .then((data) => { console.log(data); @@ -109,7 +109,7 @@ const Post = (props) => {

- {state.upvotes} Likes + {state.upvotes.length()} Likes