-
Notifications
You must be signed in to change notification settings - Fork 50
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
Candra Adi #33
base: main
Are you sure you want to change the base?
Candra Adi #33
Conversation
server/middlewares/authorize.js
Outdated
@@ -0,0 +1,18 @@ | |||
const { Todo } = require('../models') |
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.
Todo????
server/middlewares/authorize.js
Outdated
|
||
module.exports = async(req, res, next) => { | ||
try{ | ||
const todo = await Todo.findOne({ |
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.
Todo???
Task.belongsTo(models.User) | ||
} | ||
}; | ||
Task.init({ |
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.
validasi jangan lupa yah
server/routes/task-route.js
Outdated
|
||
router.post('/', TaskController.addTask) | ||
router.get('/', TaskController.showAll) | ||
router.put('/', authorization, TaskController.updateTask) |
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.
ga butuh id kah?
server/routes/task-route.js
Outdated
router.post('/', TaskController.addTask) | ||
router.get('/', TaskController.showAll) | ||
router.put('/', authorization, TaskController.updateTask) | ||
router.delete('/', authorization, TaskController.delete) |
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.
ga butuh id kah?
secret=rahasia |
No description provided.