muhammadKholid / fancy-to-do

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fancy-to-do

Fancy to-do lets your work more collaboratively and get more done.

Fancy to-do, enable you to organize nd prioritize your projects in a fun and flexible.

Work with any team

Whether it's for work a side-project or even the next family vacation, Fancy to-do helps your team stay organized.

Docs

CRUD Database

  1. ___POST/todos:
  • Request header:
{
  "Content-Type": "application/json"
}
  • Request body:
{
  "title":"Learn restAPI",
  "descriptions": "Learn how to create RESTful API with Express and Sequelize",
  "due_date":"2020-03-01"
}
  • Response:
{
  "id": 1,
  "title":"Learn restAPI",
  "descriptions": "Learn how to create RESTful API with Express and Sequelize",
  "due_date":"2020-03-01"
}

Success

{
  "status": 201
  "message": "Berhasil menambah data"
}

Error

{
  status: 404
  "error": "Error message"
}
{
  "status": 500
  "error": "Internal server error"
}
  1. GET/todos:
  • Request body:
{
  "title":"Learn restAPI",
  "descriptions": "Learn how to create RESTful API with Express and Sequelize",
  "due_date":"2020-03-01"
}
  • Response:

Success

{
  "status": 200
  "data": [{data as requested from database}]
}

Error

{
  "status": 404
  "error": "Error message"
}
{
  "status": 500
  "error": "Internal server error"
}
  1. GET/todos/:id:
  • Response:

Success

{
  "status": 200
  "data": [{ Specified data as requested from database}]
}

Error

{
  "status": 404
  "error": "Error message"
}
{
  "status": 500
  "error": "Internal server error"
}
  1. PUT/todos/:id:
  • Response:

  • Request body:

{
  "title":"Learn restAPI",
  "descriptions": "Learn how to create RESTful API with Express and Sequelize",
  "due_date":"2020-03-01"
}

Success

{
  "status": 201
  "message": "Berhasil mengupdate data"
}

Error

{
  status: 404
  "error": "Error message"
}
{
  "status": 500
  "error": "Internal server error"
}
  1. DELETE/todos/:id_:
  • Response:

Success

{
  "status": 200
  "message": "Berhasil menghapus data"
}

Error

{
  "error": "Error message"
}
{
  "status": 500
  "error": "Internal server error"
}

CRUD Database

  1. ___POST/todos/register:
  • Request header:
{
  "Content-Type": "application/json"
}
  • Request body:
{
  "username":"Jhon Doe",
  "email": "jhondoe@google.com",
  "password":"*******"
}
  • Response:
{
  "id": 1
  "username":"Jhon Doe",
  "email": "jhondoe@google.com",
  "password":"*******"
}

Success

{
  "status": 201
  "message": "succesfuly created new user"
}

Error

{
  status: 400
  "error": "validation error"
}
{
  "status": 500
  "error": "Internal server error"
}
  1. ___POST/todos/login:
  • Request header:
{
  "token": "kjashsncfhvoyi38572375nicuelircw"
  "Content-Type": "application/json"
}
  • Request body:
{
  "username":"Jhon Doe",
  "password":"*******"
}
  • Response:

Success

{
  "status": 201
  "message": "succesfuly created new user"
}

Error

{
  status: 400
  "error": "Bad request"
}
{
  "status": 500
  "error": "Internal server error"
}
  1. __POST/todos/google-sign-in:
  • Request body:
{
  "token": "hancyb8a7aw83n4nx"
}
  • Response:

Success

{
  "status": 200
  "message": "succesfuly signed in"
}

Success

{
  "status": 201
  "message": "succesfuly created new user"
}

Error

{
  status: 400
  "error": "Bad request"
}
{
  "status": 500
  "error": "Internal server error"
}

About


Languages

Language:JavaScript 72.6%Language:HTML 27.4%