enh: sort by descending order

This commit is contained in:
Timothy J. Baek
2024-10-01 21:35:18 -07:00
parent 1b7d363d32
commit 5933d7a216
2 changed files with 3 additions and 2 deletions

View File

@@ -102,7 +102,9 @@ class ProjectTable:
with get_db() as db:
return [
ProjectModel.model_validate(project)
for project in db.query(Project).all()
for project in db.query(Project)
.order_by(Project.updated_at.desc())
.all()
]
def get_project_by_id(self, id: str) -> Optional[ProjectModel]: