-
Notifications
You must be signed in to change notification settings - Fork 0
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
feito até o 2, o 1 ta dando pau pelo .rest #51
base: master
Are you sure you want to change the base?
Conversation
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.
Oi, Douglas! Seu projeto foi considerado acima do esperado.
Você conseguiu integrar bem o que foi visto nas aulas de banco de dados com o conteúdo da semana anterior. Deixei alguns comentários no corpo do projeto, mas em linhas gerais você parece ter absorvido bem os temas da semana. Meus parabéns e até o próximo projeto!
// } | ||
|
||
// console.log("Resposta", response) | ||
|
||
// if (response[0] === []){ | ||
// res.status(404).send("Id not found") | ||
// } |
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.
Lembrar de remover blocos de código comentados
app.put("/task", async (req: Request, res: Response) => { | ||
try { | ||
|
||
if (req.body) { |
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.
Essa verificação não é muito confiável, porque if(req.body) normalmente vai retornar true, pois chega valendo {}
, que não é considerado um valor nao preenchido.
let transformar = req.body.data_limite.split("/") | ||
let data_nova = transformar[2]+"-"+transformar[1]+"-"+transformar[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.
Muito bom! Mexer com datas pode ser bem chato, recomendo que você extraia esse trecho e transforme numa função, para que possa usar em outros lugares. Tem uma lib que eu gosto muito pra facilitar esse tratamento, o Day.js.
No description provided.