feat: Order supa repo results reverse chronologically
This commit is contained in:
parent
3948b9060c
commit
84ea46f142
1 changed files with 5 additions and 1 deletions
|
|
@ -52,7 +52,11 @@ class ImprovementSupaRepo(IImprovementRepo):
|
||||||
def get_all(self) -> list[Improvement]:
|
def get_all(self) -> list[Improvement]:
|
||||||
return [
|
return [
|
||||||
self._from_tbl_row(row)
|
self._from_tbl_row(row)
|
||||||
for row in self.client.table(self.config.TABLE).select("*").execute().data
|
for row in self.client.table(self.config.TABLE)
|
||||||
|
.select("*")
|
||||||
|
.order("date_orig_ts", desc=True)
|
||||||
|
.execute()
|
||||||
|
.data
|
||||||
]
|
]
|
||||||
|
|
||||||
def _to_tbl_row(self, imp: Improvement) -> dict[str, str | int]:
|
def _to_tbl_row(self, imp: Improvement) -> dict[str, str | int]:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue