diff --git a/pkg/internal/server/api/recommendation_api.go b/pkg/internal/server/api/recommendation_api.go index cc3513b..1e67001 100644 --- a/pkg/internal/server/api/recommendation_api.go +++ b/pkg/internal/server/api/recommendation_api.go @@ -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 { diff --git a/settings.toml b/settings.toml index 4321674..13bb7ca 100644 --- a/settings.toml +++ b/settings.toml @@ -6,7 +6,7 @@ domain = "im.solsynth.dev" secret = "LtTjzAGFLshwXhN4ZD4nG5KlMv1MWcsvfv03TSZYnT1VhiAnLIZFTnHUwR0XhGgi" [debug] -database = false +database = true print_routes = false [dealer]