mirror of
https://github.com/ClaytonWWilson/CS307-Team24.git
synced 2025-12-16 18:28:47 +00:00
Added link in index.js
This commit is contained in:
parent
3f3a93be8c
commit
2fc37e3e34
@ -44,7 +44,7 @@ app.get("/user", fbAuth, getAuthenticatedUser);
|
|||||||
/*------------------------------------------------------------------*
|
/*------------------------------------------------------------------*
|
||||||
* handlers/post.js *
|
* handlers/post.js *
|
||||||
*------------------------------------------------------------------*/
|
*------------------------------------------------------------------*/
|
||||||
const { getallPostsforUser, putPost
|
const { getallPostsforUser, putPost, getAllPosts
|
||||||
} = require("./handlers/post");
|
} = require("./handlers/post");
|
||||||
|
|
||||||
app.get("/getallPostsforUser", getallPostsforUser);
|
app.get("/getallPostsforUser", getallPostsforUser);
|
||||||
@ -52,6 +52,9 @@ app.get("/getallPostsforUser", getallPostsforUser);
|
|||||||
// Adds one post to the database
|
// Adds one post to the database
|
||||||
app.post("/putPost", fbAuth, putPost);
|
app.post("/putPost", fbAuth, putPost);
|
||||||
|
|
||||||
|
// Displays posts on home page
|
||||||
|
app.post("/getAllPosts", getAllPosts );
|
||||||
|
|
||||||
/*------------------------------------------------------------------*
|
/*------------------------------------------------------------------*
|
||||||
* handlers/topic.js *
|
* handlers/topic.js *
|
||||||
*------------------------------------------------------------------*/
|
*------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -71,7 +71,7 @@ class user extends Component {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
.catch(err => console.log(err));
|
.catch(err => console.log(err));
|
||||||
axios.get('/posts')
|
axios.get('/getAllPosts')
|
||||||
.then(res => {
|
.then(res => {
|
||||||
this.setState({
|
this.setState({
|
||||||
posts: res.data
|
posts: res.data
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user