🐛 Fix buggy recommendation query statement
This commit is contained in:
parent
2cf24c4724
commit
dda0687b1a
@ -14,7 +14,7 @@ func listRecommendationDefault(c *fiber.Ctx) error {
|
||||
realmId := c.QueryInt("realmId", 0)
|
||||
maxDownVote := c.QueryInt("maxDownVote", 3)
|
||||
|
||||
tx := database.C.Joins("Author").Where("accounts.total_downvote <= ?", maxDownVote)
|
||||
tx := database.C.Joins("Author").Where("\"Author\".total_downvote <= ?", maxDownVote)
|
||||
tx = services.FilterPostDraft(tx)
|
||||
if realmId > 0 {
|
||||
if realm, err := services.GetRealmWithExtID(uint(realmId)); err != nil {
|
||||
@ -47,7 +47,7 @@ func listRecommendationShuffle(c *fiber.Ctx) error {
|
||||
realmId := c.QueryInt("realmId", 0)
|
||||
maxDownVote := c.QueryInt("maxDownVote", 3)
|
||||
|
||||
tx := database.C.Joins("Author").Where("accounts.total_downvote <= ?", maxDownVote)
|
||||
tx := database.C.Joins("Author").Where("\"Author\".total_downvote <= ?", maxDownVote)
|
||||
tx = services.FilterPostDraft(tx)
|
||||
if realmId > 0 {
|
||||
if realm, err := services.GetRealmWithExtID(uint(realmId)); err != nil {
|
||||
|
@ -6,7 +6,7 @@ domain = "im.solsynth.dev"
|
||||
secret = "LtTjzAGFLshwXhN4ZD4nG5KlMv1MWcsvfv03TSZYnT1VhiAnLIZFTnHUwR0XhGgi"
|
||||
|
||||
[debug]
|
||||
database = false
|
||||
database = true
|
||||
print_routes = false
|
||||
|
||||
[dealer]
|
||||
|
Loading…
Reference in New Issue
Block a user