🐛 Fix batch list reactions cannot work properly

This commit is contained in:
2024-07-05 21:06:18 +08:00
parent d7113b5237
commit 0015952f92
5 changed files with 17 additions and 13 deletions

View File

@ -61,7 +61,8 @@ func listArticle(c *fiber.Ctx) error {
tx = services.FilterArticleWithTag(tx, c.Query("tag"))
}
count, err := services.CountArticle(tx)
counTx := tx
count, err := services.CountArticle(counTx)
if err != nil {
return fiber.NewError(fiber.StatusInternalServerError, err.Error())
}

View File

@ -62,7 +62,8 @@ func listPost(c *fiber.Ctx) error {
tx = services.FilterPostWithTag(tx, c.Query("tag"))
}
count, err := services.CountPost(tx)
countTx := tx
count, err := services.CountPost(countTx)
if err != nil {
return fiber.NewError(fiber.StatusInternalServerError, err.Error())
}