Git Product home page Git Product logo

fancy-todo's Introduction

todos

TODOS

POST signup

http://localhost:3000/users/signup

Headers

Body

{
    "email" : "[email protected]",
    "password" : "1234",
    "name" : "fransiskus arnoldy"

}

Succsess

{
    message : `Created account succsess`
}

Error

{
    "message": "email has been use, try another email"
}

GET allusers

http://localhost:3000/users/all

Headers

token

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjViYjg5ZWEwM2MyZjMxM2RmNjVhNTE5NyIsImVtYWlsIjoiaGFsb0BnbWFpbC5jb20iLCJuYW1lIjoiZnJhbnNpc2t1cyBhcm5vbGR5IiwiaWF0IjoxNTM4ODQwODQ4fQ.x87xTVmdlChvcP2cWgsrZQ8LkGA51ea8DrP7FRRSTLA

Succsess

{
    
}

Error

401 : 
{
    "message": "You must login First"
}

GET Show All Todos

http://localhost:3000/users/all

Headers

token

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjViYjg5ZWEwM2MyZjMxM2RmNjVhNTE5NyIsImVtYWlsIjoiaGFsb0BnbWFpbC5jb20iLCJuYW1lIjoiZnJhbnNpc2t1cyBhcm5vbGR5IiwiaWF0IjoxNTM4ODQwODQ4fQ.x87xTVmdlChvcP2cWgsrZQ8LkGA51ea8DrP7FRRSTLA

Succsess

{
    
}

Error

401 : 
{
    "message": "You must login First"
}

POST signin

http://localhost:3000/signin

Headers

Body

{
    "email" : "[email protected]",
    "password" : "1234"
}

Succsess

{
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjViYjhlY2YyOTdhNTFkNzZkZDUwNGY4NCIsImVtYWlsIjoiaGFsb0BnbWFpbC5jb20iLCJuYW1lIjoiZnJhbnNoaXJvIiwiaXNHb29nbGUiOmZhbHNlLCJpYXQiOjE1Mzg5NTg0NTR9.Oum_pdqLvHaA1qtPwTJuOJgQLR1KGyQq5rHKWIe_pAk"
}

Error

{
    "message": "Email or Password is Incorrect"
}

GET viewProfile

http://localhost:3000/users/profile

Headers

token

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjViYjg5ZWEwM2MyZjMxM2RmNjVhNTE5NyIsImVtYWlsIjoiaGFsb0BnbWFpbC5jb20iLCJuYW1lIjoiZnJhbnNpc2t1cyBhcm5vbGR5IiwiaWF0IjoxNTM4ODQwODQ4fQ.x87xTVmdlChvcP2cWgsrZQ8LkGA51ea8DrP7FRRSTLA

PUT editProfile

http://localhost:3000/users/edit

Headers

token

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjViYjg5ZWEwM2MyZjMxM2RmNjVhNTE5NyIsImVtYWlsIjoiaGFsb0BnbWFpbC5jb20iLCJuYW1lIjoiZnJhbnNpc2t1cyBhcm5vbGR5IiwiaWF0IjoxNTM4ODQwODQ4fQ.x87xTVmdlChvcP2cWgsrZQ8LkGA51ea8DrP7FRRSTLA

Body

{
    "email" : "[email protected]",
    "name" : "frans arnold",
    "password" : "1234"
}

DELETE deleteUser

http://localhost:3000/users/delete

Headers

token

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjViYjhlY2YyOTdhNTFkNzZkZDUwNGY4NCIsImVtYWlsIjoiaGFsb0BnbWFpbC5jb20iLCJuYW1lIjoiZnJhbnNoaXJvIiwiaXNHb29nbGUiOmZhbHNlLCJpYXQiOjE1Mzg4NTM2ODV9.OzRkzV4UJ8RNIxEzo4BEvJ5os0QMe42xPpqClhTaFFM

POST addTodo

http://localhost:3000/todos/add

Headers

token

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjViYjhlY2YyOTdhNTFkNzZkZDUwNGY4NCIsImVtYWlsIjoiaGFsb0BnbWFpbC5jb20iLCJuYW1lIjoiZnJhbnNoaXJvIiwiaXNHb29nbGUiOmZhbHNlLCJpYXQiOjE1Mzg4NTM2ODV9.OzRkzV4UJ8RNIxEzo4BEvJ5os0QMe42xPpqClhTaFFM

Body

    {
    	"title" : "venom",
    	"description" : "nonton bareng film venom di gandaria city",
    	"dueDate" : "10-19-2018"
    }

Succsess

{
    "message": "Success create todo list"
}

Error

{
    "message": "You must login First"
}

PUT updateTodo

http://localhost:3000/todos/update/5bb90bb23de07a0b69b085e0

Headers

token

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjViYjhlY2YyOTdhNTFkNzZkZDUwNGY4NCIsImVtYWlsIjoiaGFsb0BnbWFpbC5jb20iLCJuYW1lIjoiZnJhbnNoaXJvIiwiaXNHb29nbGUiOmZhbHNlLCJpYXQiOjE1Mzg4NTM2ODV9.OzRkzV4UJ8RNIxEzo4BEvJ5os0QMe42xPpqClhTaFFM

Body

{
    "title" : "makan siang",
    "description" : "makan siang bareng teman2 hacktiv",
    "dueDate" : "10-10-2018"
}

Succsess

{
    "message": "Update todo Success"
}

Error

{
    "message": "You must login First"
}

PATCH set Finish

http://localhost:3000/todos/setFinish/:id

Headers

token

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjViYjhlY2YyOTdhNTFkNzZkZDUwNGY4NCIsImVtYWlsIjoiaGFsb0BnbWFpbC5jb20iLCJuYW1lIjoiZnJhbnNoaXJvIiwiaXNHb29nbGUiOmZhbHNlLCJpYXQiOjE1Mzg4NTM2ODV9.OzRkzV4UJ8RNIxEzo4BEvJ5os0QMe42xPpqClhTaFFM

Succsess

{
    "message": "Your todo has been set to finish"
}

Error

{
    "message": "You must login First"
}

PATCH set not Finish

http://localhost:3000/todos/setNotFinishYet/:id

Headers

token

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjViYjhlY2YyOTdhNTFkNzZkZDUwNGY4NCIsImVtYWlsIjoiaGFsb0BnbWFpbC5jb20iLCJuYW1lIjoiZnJhbnNoaXJvIiwiaXNHb29nbGUiOmZhbHNlLCJpYXQiOjE1Mzg4NTM2ODV9.OzRkzV4UJ8RNIxEzo4BEvJ5os0QMe42xPpqClhTaFFM

Succsess

{
    "message" : `Your todo has been set to unFinish`
}

Error

{
    "message": "You must login First"
}

DELETE deleteTodo

http://localhost:3000/todos/update/:id

Headers

token

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjViYjhlY2YyOTdhNTFkNzZkZDUwNGY4NCIsImVtYWlsIjoiaGFsb0BnbWFpbC5jb20iLCJuYW1lIjoiZnJhbnNoaXJvIiwiaXNHb29nbGUiOmZhbHNlLCJpYXQiOjE1Mzg4NTM2ODV9.OzRkzV4UJ8RNIxEzo4BEvJ5os0QMe42xPpqClhTaFFM

Succsess

{
    "message": "Delete Success"
}

Error

{
    "message": "You must login First"
}

GET showTodo

http://localhost:3000/todos/show

Headers

token

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjViYjhlY2YyOTdhNTFkNzZkZDUwNGY4NCIsImVtYWlsIjoiaGFsb0BnbWFpbC5jb20iLCJuYW1lIjoiZnJhbnNoaXJvIiwiaXNHb29nbGUiOmZhbHNlLCJpYXQiOjE1Mzg4NTM2ODV9.OzRkzV4UJ8RNIxEzo4BEvJ5os0QMe42xPpqClhTaFFM

Succsess

{
     "todos": [
        {
            "isFinish": false,
            "_id": "5bb90c3d3de07a0b69b085e1",
            "title": "kencan",
            "description": "jalan-jalan ke mall , nonton",
            "dueDate": "2018-10-09T17:00:00.000Z",
            "createdAt": "2018-10-06T19:25:49.924Z",
            "updatedAt": "2018-10-06T20:16:28.162Z",
            "__v": 0
        }
    ]
}

Error

{
    "message": "You must login First"
}

fancy-todo's People

Contributors

franshiro avatar

Watchers

James Cloos 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.