feat: refactor project
This commit is contained in:
@@ -11,10 +11,7 @@ from app.schemas import RankingResponse
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
SAMPLE_JOIN = (
|
||||
f" inner join {settings.ELO_SCHEMA}.sample_listings as s"
|
||||
f" on l.global_id = s.global_id"
|
||||
)
|
||||
SAMPLE_JOIN = f" inner join {settings.ELO_SCHEMA}.sample_listings as s on l.global_id = s.global_id"
|
||||
|
||||
|
||||
@router.get("/rankings", response_model=list[RankingResponse])
|
||||
@@ -37,6 +34,5 @@ def get_rankings(
|
||||
listings = [row_to_listing(row) for row in result]
|
||||
|
||||
return [
|
||||
RankingResponse(rank=offset + i + 1, listing=listing)
|
||||
for i, listing in enumerate(listings)
|
||||
RankingResponse(rank=offset + i + 1, listing=listing) for i, listing in enumerate(listings)
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user