Giter Club home page Giter Club logo

fancy-todo-1's Introduction

fancy-todo

#Todo:

Routes Method Headers Request Body Response Success Response Error Description
/api/todo/read/all/ GET token Required - [{"_id":"5d062da5bf24510b82500a1d", "name": "Coba", "description": "asfeqfwrg", "status": "On Going","dueDate": "2019-06-18T00:00:00.000Z","userEmail": "[email protected]","__v": 0}] 400 (Invalid Token)
401 (Please login first)
404 (User not found)
500 (Internal Server Error)
Get all the user's todos
/api/todo/read/one/:todoId GET token Required - [{"_id":"5d062da5bf24510b82500a1d", "name": "Coba", "description": "asfeqfwrg", "status": "On Going","dueDate": "2019-06-18T00:00:00.000Z","userEmail": "[email protected]","__v": 0}] 400 (Invalid Token)
401 (Please login first)
404 (User not found)
500 (Internal Server Error)
Get one todo based on its id
/api/todo/create POST token Required name:String
description:String
status:String
dueDate:Date
userEmail:String
{"_id":"5d062da5bf24510b82500a1d", "name": "Coba", "description": "asfeqfwrg", "status": "On Going","dueDate": "2019-06-18T00:00:00.000Z","userEmail": "[email protected]","__v": 0} 400 (Invalid Token)
401 (Please login first)
404 (User not found)
500 (Internal Server Error)
Add a todo into database
/api/todo/update/:todoId PATCH token Required name:String
description:String
status:String
dueDate:Date
userEmail:String
{"n": 1, "nModified": 1, "ok": 1} 400 (Invalid Token)
401 (Please login first)
404 (User not found)
500 (Internal Server Error)
Edit a todo
/api/todo/delete/:todoId DELETE token Required - {"n": 1, "ok": 1, "deletedCount": 1} 400 (Invalid Token)
401 (Please login first)
404 (User not found)
500 (Internal Server Error)
Delete a todo

#User: | Routes | Method | Headers | Request Body | Response Success | Response Error | Description| |-----------------------------------|-----|----|----------------------------------|------------------|---------------------|------------------------------------------------------------------------------| | `/user/register`| POST | - | firstName: String
lastName: String
email: String
password: String| ```{"_id": "5d06521e6961ec126ed934f3", "firstName": "Uzumaki", "lastName": "Nobita", "email": "[email protected]", "password": "$2a$10$88woarIgPqug02EjVAAnI.mCtzvperV.oA8HV2XSPWjnsclDraA9i", "__v": 0}```| 400 (Invalid Token)
401 (Please login first)
404 (User not found)
500 (Internal Server Error) | Register User| | `/user/login`| POST | - | email: String
password: String| ```"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZDA1MDI3YzZjNWQ2NDVkOTY5MDRkYzgiLCJlbWFpbCI6Im5pbmphaGF0b3JpQGdtYWlsLmNvbSIsImlhdCI6MTU2MDY5NTQyMH0.VcohCGQWZEpblb7ckovI9lsqgbC67q8b0LJacLpsgq0"```| 400 (Invalid Token)
401 (Please login first)
404 (User not found)
500 (Internal Server Error) | User Login Validation |

fancy-todo-1's People

Contributors

aryadi avatar wikasilo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.