fix: image and ranking bugfix
This commit is contained in:
@@ -4,6 +4,7 @@ from fastapi import APIRouter, Depends
|
||||
from sqlalchemy import text
|
||||
from sqlalchemy.orm import Session
|
||||
|
||||
from app.config import settings
|
||||
from app.database import get_db
|
||||
from app.queries import LISTING_SELECT, row_to_listing
|
||||
from app.schemas import RankingResponse
|
||||
@@ -18,8 +19,14 @@ def get_rankings(
|
||||
offset: int = 0,
|
||||
db: Session = Depends(get_db),
|
||||
):
|
||||
"""Return listings ranked by ELO rating (highest first)."""
|
||||
query = LISTING_SELECT
|
||||
"""Return listings ranked by ELO rating (highest first).
|
||||
|
||||
Only listings in the stable sample (elo.sample_listings) are shown.
|
||||
"""
|
||||
query = LISTING_SELECT + f"""
|
||||
INNER JOIN {settings.ELO_SCHEMA}.sample_listings s
|
||||
ON l.global_id = s.global_id
|
||||
"""
|
||||
params: dict = {"limit": limit, "offset": offset}
|
||||
|
||||
if status and status != "all":
|
||||
|
||||
Reference in New Issue
Block a user