Skip to content

feito até o 2, o 1 ta dando pau pelo .rest#51

Open
crascaroth wants to merge 3 commits intomasterfrom
semana15projeto
Open

feito até o 2, o 1 ta dando pau pelo .rest#51
crascaroth wants to merge 3 commits intomasterfrom
semana15projeto

Conversation

@crascaroth
Copy link
Collaborator

No description provided.

Copy link
Contributor

@jvpalves jvpalves left a 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!

Comment on lines +33 to +39
// }

// console.log("Resposta", response)

// if (response[0] === []){
// res.status(404).send("Id not found")
// }
Copy link
Contributor

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) {
Copy link
Contributor

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.

Comment on lines +69 to +70
let transformar = req.body.data_limite.split("/")
let data_nova = transformar[2]+"-"+transformar[1]+"-"+transformar[0]
Copy link
Contributor

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.

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