Skip to content

dennyshuda/todos-api

Repository files navigation

TODOS REST API

To start local environment run yarn dev or npm run dev

Endpoint

AUTH

Register

http://localhost:4000/register

  • method: POST
  • body:
{
  "name": "John Doe",
  "email": "[email protected]",
  "password": "Password123"
}

Login

http://localhost:4000/login

  • method: POST
  • body:
{
  "email": "[email protected]",
  "password": "Password123"
}

Todos

Create Todos (Auth)

http://localhost:4000/todos

  • method: POST
  • Content-Type: application/json
  • Authorization: Bearer token
  • body:
{
  "authorId": "0b2e0cc3-7e44-45e7-be98-8bc7a806bc98",
  "title": "tester 2",
  "description": "gatauuu",
  "deadline": "2008-01-01T00:00:00.000Z"
}

Update Todos (Auth)

http://localhost:4000/todos/:todoId

  • method: POST
  • Content-Type: application/json
  • Authorization: Bearer token
  • body:
{
  "authorId": "0b2e0cc3-7e44-45e7-be98-8bc7a806bc98",
  "title": "tester 2",
  "description": "gatauuu",
  "deadline": "2008-01-01T00:00:00.000Z"
}

Get Todos by ID (Auth)

http://localhost:4000/todos/:todoId

  • method: GET

Get All Todos (Auth)

http://localhost:4000/todos

  • method: GET

Delete Todos by ID (Auth)

http://localhost:4000/todos/:todoId

  • method: DELETE
  • parameter is todo's ID

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published