🐛 Fix query statement in shuffle
This commit is contained in:
parent
1925f26f16
commit
2f8f799926
@ -6,7 +6,6 @@ import (
|
||||
"git.solsynth.dev/hydrogen/interactive/pkg/internal/database"
|
||||
"git.solsynth.dev/hydrogen/interactive/pkg/internal/services"
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
func listRecommendationDefault(c *fiber.Ctx) error {
|
||||
@ -64,7 +63,7 @@ func listRecommendationShuffle(c *fiber.Ctx) error {
|
||||
return fiber.NewError(fiber.StatusInternalServerError, err.Error())
|
||||
}
|
||||
|
||||
items, err := services.ListPost(tx, take, offset, gorm.Expr("RANDOM()"))
|
||||
items, err := services.ListPost(tx, take, offset, "RANDOM()")
|
||||
if err != nil {
|
||||
return fiber.NewError(fiber.StatusBadRequest, err.Error())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user