Skip to content

v1.1.0

Latest
Compare
Choose a tag to compare
@xkelxmc xkelxmc released this 25 Jun 00:05
· 1 commit to master since this release

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