-
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
Jeplind Morico #3
base: master
Are you sure you want to change the base?
Conversation
models/todo.js
Outdated
msg: "must be in date format" | ||
}, | ||
isAfter: { | ||
args: `${new Date()}`, |
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.
untuk validasi tanggal tidak bisa menggunakan isAfter karena argsnya jalan ketika server dijalankan, misal server nyala di 17 agustus , di 19 agustus kita masih bisa bikin todo untuk 18 agustus (karena new date nya dibuat saat 17 agustus)
routes/index.js
Outdated
const Controller = require('../controllers/controller') | ||
|
||
|
||
router.post('/todos', Controller.postTodo); |
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 dibuat ke todo.js jadi semua router todo ada disitu
need improvement:
|
.then((user) => { | ||
if (!user) { //if user is not found | ||
throw {msg: "invalid email/password", status: 401} | ||
} else if (!hashedPassword(payload.password, user.password)) { //compare password fail |
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.
disini kita perlu nge hash password atau membandingkan password ?
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.
diperbaiki ya :D
config controllers dll yang ada diluar server di hapus ya |
1. Add client-main.js 2. Add client-index.html 3. Rev. model user
1. Add Sign In Google
1. Rev. dokumentasi 2. Handling Error pada Client 3. Rev. main.js weather function
di client label dan input type kebalik, biasanya label dulu ya baru input type |
tombol edit delete done numpuk |
ketika edit, sebaiknya data yang sebelumnya dimasukan ke form edit sehingga user tidak perlu ketik ulang dari awal semuanya |
tanggal di client tolong di format menjadi tanggal yang mudah dibaca oleh user |
tombol register login logout muncul terus di atas, harusnya ketika sudah login, tombol login register di hide |
ketika berhasil menambah todo baiknya form dibersihkan valuenya |
tombol edit kalo dipencet beberapa kali formnya numpuk kebawah |
ketiak user delete baiknya ada konfirmasi apakah yakin mau delete / tidak |
ketika login logout login lagi cuacanya jadi dobel numpuk kebawah |
"status": "not finished", | ||
"due_date": "2020-10-29T00:00:00.000Z", | ||
"createdAt": "2020-10-26T10:43:44.518Z", | ||
"updatedAt": "2020-10-26T10:43:44.518Z" |
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 ada user id nya?
testing pull request