-
Notifications
You must be signed in to change notification settings - Fork 371
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
feat: Buscar a quantidade de comentários por post na homepage #340
Conversation
@gabrielew is attempting to deploy a commit to the TabNews Team on Vercel. To accomplish this, @gabrielew needs to request access to the Team. Afterwards, an owner of the Team is required to accept their membership request. If you're already a member of the respective Vercel Team, make sure that your Personal Vercel Account is connected to your GitHub account. |
…ildren_count' Agora é possível retornar a proriedade 'children_count' na home e também quando você seleciona um usuário específico
async function findChildrenCount(contents) { | ||
const contentsWithChildrenAmount = []; | ||
for await (const content of contents) { | ||
const children = await findChildrenAmount({ |
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.
Está é a melhorar maneira de buscar a quantidade de children_count?
@@ -541,11 +570,91 @@ async function findChildren(options) { | |||
} | |||
} | |||
|
|||
async function findChildrenAmount(options) { |
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.
Dupliquei a função findChildren, porém reduzi o máximo possível de campos retornados na query.
@filipedeschamps do jeito que fiz a consulta não está retornando todo o children no endpoint. Acha coerente com o que é pedido? |
@gabrielew show!!! Muito obrigado pela contribuição! Sobre o tabnews.com.br/models/content.js Line 575 in b6fe0e8
Ainda estou revisando o PR dele e faltam algumas coisas, mas acredito que seja interessante dar continuidade com a dele por ter uma implementação mais semântica, mas o PR não cobre a parte do frontend. Então a gente pode separar em duas implementações separadas, para aproveitar o que você fez no frontend... então por enquanto deixe esse PR aberto, combinado? 🤝 |
@gabrielew você foi citado na última publicação comemorativa: https://www.tabnews.com.br/filipedeschamps/nova-melhoria-numero-de-comentarios-nas-publicacoes 😍 |
@filipedeschamps massa!! Vi por lá mesmo, kkk |
Ainda não cheguei a montar a parte de testes #334
Quem quiser dar pull e realizar alterações fique a vontade!