Skip to content

Conversation

@bobkombat
Copy link

No description provided.

@bobkombat bobkombat requested a review from Sursev07 August 4, 2020 15:17
@@ -0,0 +1,20 @@
require('dotenv').config();
const express = require('express');
const todoRouter = require('./router');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kenapa ga panggil index.js aja disini?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const routes = require('./router);

app.get('/', (req, res) => {
res.send('Hello World');
})
app.use('/', usersRouter);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

disini ntar tinggal use

Suggested change
app.use('/', usersRouter);
app.use(routes);

console.log(req.userLogin.Todos, req.params.id);
for(let i of req.userLogin.Todos)
{
if (+req.params.id == i.id)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ini di looping kira2 buat apa yah?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cek masuk localhost/todos/:id yang id todos nya gaada di user jadi kalo gaada gabisa dilihat

msg: 'You must input a date'
},
isAfter: {
args: "2020-08-03",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ini ga dinamis yah date nya ?
kalau pakai new Date() ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants