-
Notifications
You must be signed in to change notification settings - Fork 9
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
Muhammad Akbar Habiby Khalid #2
base: master
Are you sure you want to change the base?
Conversation
need improvement:
|
done kak sudah di perbaiki |
const status = req.body.status | ||
const patched = await Todo.update({ status }, { where: { id }, returning: true }) | ||
|
||
res.status(200).json(patched[1][0]) |
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.
lebih baik di cek dulu patched ke 0 nya 0 atau bukan, kalo bukan berarti ada yg keupdate, kalo 0 berarti ga ada yg keupdate
static async deleteTodoById(req, res, next) { | ||
try { | ||
const id = +req.params.id | ||
await Todo.destroy({ where: { 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.
ini juga lebih baik di simpan ke variabel dan dilihat hasil deletenya 0 atau bukan, kalo 0 berarti ga ada yg kedelete
penamaan file baiknya konsisten ya, misal jika kebab case, kebab case semua ga ada yg camel case. terus superman sama batman nya tolong di rename ya :D |
Fixed ISO Date, converted to normal date
Added Heroku Config
good job ! keep up the good work |
No description provided.