As a Registered user, I can
Language : Python - version 3
Framework : Flask
Database : MongoDB
/api/user/register
-body
{
"first_name":"john",
"last_name":"doe",
"email":"john@gmail.com",
"password":"123456"
}
To login : will get and jwt token. - POST
/api/user/#
-body
{
"email":"john@gmail.com",
"password":"123456"
}
To Logout - will logout user/admin - GET
Get all user list : secured, authorized to admin only - GET
/api/user/all?page=1,per_page=10
Get individual user details : secured, only authorized admin and user himself and access it - GET
/api/user/details{user_id}
Update user information : secured, only authorized admin and user himself and access it - PUT
/api/user/update/{user_id}
-body
{
"email":"fahim@gmail.com"
}
/api/user/details/my-profile
/api/user/update/my-profile
-body
{
"first_name":"fahim"
}
/api/user/update/change-password
Delete a user : secured, only authorized admin and user himself and access it - DELETE
/api/user/delete/{user_id}
Get all blog List - all visitors can access it, it will have pagination - GET
Get Individual user all blog List - all visitors can access it, it will have pagination - GET
Get individual blog details : all visitors can access it - GET
/api/blog/details/{blog_id}
Add new blog : only authorized users and admin can do it - POST
/api/blog/add-new
-body
{
"title":"test 1",
"description":"test 1 desc"
}
Update blog : only user who uploaded it or authorized admin can do it - PUT
/api/blog/update/{id}
-body
{
"title":"test 1 updated",
"description":"test 1 desc"
}
Delete blog : only user who uploaded it or authorized admin can do it - DELETE
/api/blog/delete/{blog_id}
Upvote : only registered user/admin can do it - POST
/api/vote/upvote/{blog_id}
Down vote : only registered user/admin can do it - POST
/api/vote/downvote/{blog_id}
/api/comment/all/{blog_id}
Add new Comment : only registered user/admin can do it - POST
/api/comment/add-new
-body
{
"blog_id":"66b61b9e87b2c5efc3979d65",
"body":"test comment"
}
Update comment : only registered user and admin can do it - PUT
/api/comment/update/{comment_id}
-body
{
"body":"test comment updated"
}
Delete comment : only registered user and admin can do it - DELETE
/api/comment/delete/{comment_id}