🐛 Bug fixes in feed & recommendations

This commit is contained in:
2025-03-15 14:14:55 +08:00
parent 0fa75406ed
commit b4c78cd10c
2 changed files with 4 additions and 3 deletions

View File

@ -37,9 +37,9 @@ func listRecommendation(c *fiber.Ctx) error {
return item.ID, *item
})
// Revert the position
// Revert the position & truncate
for idx, item := range posts {
posts[idx] = newPostMap[item.ID]
posts[idx] = services.TruncatePostContent(newPostMap[item.ID])
}
return c.JSON(posts)