This the BlogApp Database where we create a blog, Like Unlike and comment.
This project involves implementing the following tasks:
- Endpoint:
http://localhost:4000/api/v1/posts/create
- Method: POST
- Request Body: JSON
{ "title": "Dummy Post2", "body": "Dummy Post1" }
- Description: This task involves creating a new post with a title and body.
- Endpoint:
http://localhost:4000/api/v1/posts
- Method: GET
- Description: This task involves fetching a list of posts.
- Endpoint:
http://localhost:4000/api/v1/comments/create
- Method: POST
- Request Body: JSON
{ "post": "6429343f2b912f721b9c50b8", "user": "Lakshyadeep", "body": "This is the Second Comment" }
- Description: This task involves creating a comment for a specific post.
- Endpoint:
http://localhost:4000/api/v1/likes/like
- Method: POST
- Request Body: JSON
{ "post": "6429343f2b912f721b9c50b8", "user": "Lakshyadeep" }
- Description: This task involves liking a specific post.
- Endpoint:
http://localhost:4000/api/v1/likes/unlike
- Method: POST
- Request Body: JSON
{ "post": "6429343f2b912f721b9c50b8", "like": "64293e833d3611dfcad7a664" }
- Description: This task involves unliking a specific post.
This project uses the following data models:
- Fields:
- title: string
- body: string
- likes: [id, ref-like model]
- comments: [id, ref-comment model]
- Fields:
- post: [id, ref-post]
- user: string
- Fields:
- post: [id, ref-post]
- body: string
- user: string