Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nanda Achidunnafi #2

Open
wants to merge 36 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Created todo router
rafiandria23 committed Feb 3, 2020
commit e20b824c351e082600877f612c3140a984487c48
17 changes: 17 additions & 0 deletions routes/todo-router.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
"use strict";

const todoRouter = require("express").Router();
const { TodoController } = require("../controllers/todo-controller");


todoRouter.get("/", TodoController.findAll);
todoRouter.post("/", TodoController.create);
todoRouter.get("/:id", TodoController.findOne);
todoRouter.put("/:id", TodoController.update);
todoRouter.delete("/:id", TodoController.destroy);



module.exports = {
todoRouter
};