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