Skip to content

mrifkyilyas/fancy-todo-1

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

fancy-todo

Fancy Todo

List of basic routes:

Route HTTP Header(s) Body Description
/register POST none name:String,
email: String
password: String
Create a user
success:
(201), example: {"_id": String, "email": String, "password": String}
errors:
(500), error
/login POST none email: String
password: String
Login and get token based on credentials
success:
(200), example: {"_id": String, "email": String, "password": String, "token": String}
errors:
(400), {message: 'Invalid email/password'}
(500), error
/google-login POST none none Login using Oauth2 (Google)
success:
(200), example: {object}
errors:
(500), error

List of project routes:

Route HTTP Header(s) Body Description
/project GET Authenticated:
(token)
none Get all project info
success:
(200), example: [{"name": String, "createdBy": String, "members": [ObjectId]}, {"name": String, "createdBy": String, "members": [ObjectId]}, etc]
errors:
(500), error
/project/:id GET Authenticated:
(token)
Authorized:
(check is Registered memberId)
none Get a single project info
success:
(200), example: {"name": String, "createdBy": String, "members": [ObjectId]}
errors:
(404), example: {message: 'Project not found'}
(500), error
/project POST Authenticated:
(token),
Authorized:
(check isUser)
name: String Create a project (authorized user)
success:
(201), example: {"name": String, "createdBy": String, "members": [ObjectId]}
errors:
(500), error
/project/:id PATCH Authenticated:
(token)
Authorized:
(check is Registered memberId)
name: String Update a project name with new info (owner Project only)
success:
(200), example: {message: 'Updated'}
errors:
(404), example: {message: 'Project not found'}
(500), error
/project/addmember/:id POST Authenticated:
(token)
Authorized:
(check is Registered memberId)
email: String Add a new member to the project
(200), example: {message: 'Member successfully added'}
errors:
(404), example: {message: 'User not found'}
(500), error
/project/deletemember/:id Delete Authenticated:
(token)
Authorized:
(check is Registered memberId)
none Delete a member (owner Project only)
success:
(200), example: {message: 'Member successfully deleted'}
errors:
(404), example: {message: 'Member not found'}
(500), error
/project/:id DELETE Authenticated:
(token),
Authorized:
(check is Registered memberId)
none Delete a book (owner Project only)
success:
(200), example: {message: 'Project successfully deleted'}
errors:
(404), example: {message: 'Project not found'}
(500), error

List of todo routes:

Route HTTP Header(s) Body Description
/task/project/:id GET Authenticated:
(token)
none Get todo that has based on projectId
success:
(200), example: [{"name": String, "description": String, "status": String, "due_date": String, "userId": {ObjectId}, projectId: {ObjectId}}, {"name": String, "description": String, "status": String, "due_date": String, "userId": {ObjectId}, projectId: {ObjectId}}, etc]
errors:
(500), error
/task/:id GET Authenticated:
(token)
Authorized:
(check isUser)
none Get todo that has based on userId
success:
(200), example: [{"name": String, "description": String, "status": String, "due_date": String, "userId": {ObjectId}, projectId: null}, {"name": String, "description": String, "status": String, "due_date": String, "userId": {ObjectId}, projectId: null}, etc]
errors:
(500), error
/task/:id/:todoId GET Authenticated:
(token)
Authorized:
(check isUser)
none Get a single todo info
success:
(200), example: {"name": String, "description": String, "status": String, "due_date": String, "userId": {ObjectId}, projectId: null}
errors:
(404), example: {message: 'Todo not found'}
(500), error
/task/:id POST Authenticated:
(token),
Authorized:
(check isUser)
name: String
description: String
due_date: String
Create a todo
success:
(201), example: {"name": String, "description": String, "status": String, "due_date": String, "userId": {ObjectId}, projectId: null}
errors:
(400), example: {"message": String}
(500), error
/task/:id/ PUT Authenticated:
(token)
Authorized:
(check isUser)
email: String Update a todo with new info
success:
(200), example:{"name": String, "description": String, "status": String, "due_date": String, "userId": {ObjectId}, projectId: {ObjectId}}
errors:
(404), example: {message: 'Todo not found'}
(500), error
/task/:id/ DELETE Authenticated:
(token),
Authorized:
(check isUser)
none Delete a todo
success:
(200), example: {message: 'Todo successfully deleted'}
errors:
(404), example: {message: 'Todo not found'}
(500), error

Link Deploy

Server:

Client:

About

fancy todo list with jquery

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 68.2%
  • HTML 31.6%
  • CSS 0.2%