Skip to content

Commit

Permalink
chore(router): add sorting of agent id
Browse files Browse the repository at this point in the history
  • Loading branch information
polebug committed Jan 24, 2025
1 parent a8a50df commit ab87ae3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openagent/router/routes/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def list_agents(
) -> ResponseModel[dict] | APIExceptionResponse:
try:
total = db.query(Agent).count()
agents = db.query(Agent).offset(page * limit).limit(limit).all()
agents = db.query(Agent).order_by(Agent.id.desc()).offset(page * limit).limit(limit).all()
return ResponseModel(
code=status.HTTP_200_OK,
data=AgentListResponse(
Expand Down

0 comments on commit ab87ae3

Please sign in to comment.