🐛 Fix batch list reactions cannot work properly
This commit is contained in:
@ -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())
|
||||
}
|
||||
|
@ -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())
|
||||
}
|
||||
|
Reference in New Issue
Block a user