Releases: xkelxmc/express-social-api
Releases · xkelxmc/express-social-api
v1.1.0
Changes
- Update Api routes
- Fix security for find users
- Add find posts by userId
- Add upVote and downVote posts
- Update Tests
- Add prettier
Add new routes
Root routes:
Posts:
- POST:
/posts/:postId/up
upVote post by postId - POST:
/posts/:postId/down
downVote post by postId
API:
Auth:
- POST:
/api/auth/login
login with
{"email": "string", "password": "string"}
- GET:
/api/auth/logout
logout - GET:
/api/auth/logoutall
logout on all devices - POST:
/api/auth/signup
SignUp with
{"email": "string", "password": "string", "name": "string", "lastName": "string"}
With Bearer Authorization
Users:
- GET:
/api/users/me
get current user - GET:
/api/users/:userId
get user by Id - GET:
/api/users/
find all users
Posts:
- POST:
/api/posts/
create new post form user
{"title": "string", "body": "string"}
- GET:
/api/posts/:postId
get posts by Id - GET:
/api/posts/user/:userId
get posts by userId - GET:
/api/posts/
find all posts - POST:
/api/posts/:postId/up
upVote post by postId - POST:
/api/posts/:postId/down
downVote post by postId
v1.0.0
This is a first release!
Routes:
Auth:
- POST:
/auth/login
login with{email: 'string', password: 'string'}
- GET:
/auth/logout
logout - POST:
/auth/signup
SignUp with{email: 'string', password: 'string'}
Users:
- GET:
/user
get current user - GET:
/user/:userId
get user by Id - GET:
/users/
find all users
Posts:
- POST:
/posts/
create new post form user{title: 'string', body: 'string'}
- GET:
/posts/:postId
get posts by Id - GET:
/posts/
find all posts