Skip to content

Add num_contracheques field in update GetGeneralSummary handler#594

Merged
JezzDiego merged 3 commits intomainfrom
return-paycheck-amount
Jun 26, 2025
Merged

Add num_contracheques field in update GetGeneralSummary handler#594
JezzDiego merged 3 commits intomainfrom
return-paycheck-amount

Conversation

@JezzDiego
Copy link
Contributor

Retornando o número total de contracheques coletados

depends on dadosjusbr/storage/pull/149

@JezzDiego JezzDiego self-assigned this Jun 23, 2025
@rdurl0 rdurl0 self-requested a review June 24, 2025 12:38
@@ -702,6 +702,10 @@ func (h handler) GetGeneralSummary(c echo.Context) error {
if err != nil {
return c.JSON(http.StatusInternalServerError, fmt.Sprintf("Erro ao contar registros de meses coletados: %q", err))
}
Copy link

Choose a reason for hiding this comment

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

Tem algo aqui que deu erro no GitHub Actions

Check failure on line 705 in uiapi/handlers.go

GitHub Actions
/ testing

h.client.Db.GetNumberOfPaychecksCollected undefined (type database.Interface has no field or method GetNumberOfPaychecksCollected)

Copy link
Contributor

Choose a reason for hiding this comment

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

O erro ocorre pois depende da versão atualizada do storage (que ainda estava em revisão), após o merge do storage e atualização das dependências deste repo, deve ficar tudo ok.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Exato, por isso que esse PR depende do storage ser mergeado primeiro, @rdurl0

Copy link
Contributor

@joellensilva joellensilva left a comment

Choose a reason for hiding this comment

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

Muito bom! Lembre de atualizar a versão do storage antes de mergear.

if err != nil {
return c.JSON(http.StatusInternalServerError, fmt.Sprintf("Erro ao contar registros de meses coletados: %q", err))
}
paychechs, err := h.client.Db.GetNumberOfPaychecksCollected()
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
paychechs, err := h.client.Db.GetNumberOfPaychecksCollected()
paychecks, err := h.client.Db.GetNumberOfPaychecksCollected()

return c.JSON(http.StatusOK, generalSummary{
Agencies: int(agencies),
MonthlyInfos: int(collections),
Paychecks: int(paychechs),
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Paychecks: int(paychechs),
Paychecks: int(paychecks),

@JezzDiego JezzDiego marked this pull request as ready for review June 26, 2025 13:45
@JezzDiego JezzDiego merged commit 73981e8 into main Jun 26, 2025
2 checks passed
@JezzDiego JezzDiego deleted the return-paycheck-amount branch June 26, 2025 13:51
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.

3 participants