Skip to content

preparando para o review#1

Open
ninidora wants to merge 1 commit intothipereira02:mainfrom
ninidora:review
Open

preparando para o review#1
ninidora wants to merge 1 commit intothipereira02:mainfrom
ninidora:review

Conversation

@ninidora
Copy link

No description provided.

Copy link
Author

@ninidora ninidora left a comment

Choose a reason for hiding this comment

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

Olá, Thiago!
Trouxe mais um feedback de código.

Você aplicou bem os conceitos aprendidos nas últimas aulas. Só fiz uma observação quanto ao que você implementou nos repositories.

Caso queira conversar sobre isso, sou toda ouvidos.
Até mais!

Comment on lines -37 to -58
if (question.answered === true) {
return {
question: question.question,
student: question.student,
class: question.class,
tags: question.tags,
answered: question.answered,
submitAt: question.submitAt,
answeredAt: question.answeredAt,
answeredBy: question.answeredBy,
answer: question.answer,
};
}

return {
question: question.question,
student: question.student,
class: question.class,
tags: question.tags,
answered: question.answered,
submitAt: question.submitAt,
};
Copy link
Author

Choose a reason for hiding this comment

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

Existe uma forma melhor de fazer isso, procure sobre delete do json.

Copy link
Owner

Choose a reason for hiding this comment

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

Isso ficou horrível kkk. Eu tentei outras paradas pra evitar o máximo ter que fazer isso, mas não consegui. Vou procurar sobre o delete

Comment on lines -9 to -13
const classAlreadyRegistered = await connection.query(`
SELECT *
FROM classes
WHERE name=$1
`, [userClass]);
Copy link
Author

Choose a reason for hiding this comment

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

Essas coisas são funções pequenas que deveriam estar nas services. Lógica de checagem como se a classe já existe devem estar sendo tratadas e chamadas na service.

Copy link
Owner

Choose a reason for hiding this comment

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

Mas aí no caso o service teria uma query lá nele, sem problemas?

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