-
Notifications
You must be signed in to change notification settings - Fork 51
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
Josep Razaqi #46
base: main
Are you sure you want to change the base?
Josep Razaqi #46
Conversation
…k, kalau codeku ada yang kurang
Controllers/todosController.js
Outdated
class Controller { | ||
static async getTodos(req, res, next) { | ||
try { | ||
const todos = await Todo.findAll({where: {UserId: req.loggedIn.id}}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good
Controllers/todosController.js
Outdated
description: req.body.description, | ||
status: req.body.status, | ||
due_date: req.body.due_date, | ||
UserId: req.loggedIn.id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oke dapet dari authentication ya
README.md
Outdated
# fancy-todo | ||
https://documenter.getpostman.com/view/13597012/TVewXiUa |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oke api docnya lumayan
@@ -0,0 +1,10 @@ | |||
module.exports = (err, req, res, next) =>{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
error handler dilengkapin lagi yaa
Server/routers/todoRoute.js
Outdated
|
||
|
||
route.use('/:id', authorization); | ||
route.get("/:id", TodoController.findOneTodo); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sebetulnya untuk get by id ga perlu lewat authorization yaa
middlewares/errorHandler.js
Outdated
@@ -0,0 +1,10 @@ | |||
module.exports = (err, req, res, next) =>{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
error handlernya dilengkapin lagi yaa
https://documenter.getpostman.com/view/13597012/TVewXiUa