Skip to content

Commit

Permalink
Merge pull request #47 from openrelik/order
Browse files Browse the repository at this point in the history
Default ordering by creation date for root and shared folders
  • Loading branch information
berggren authored Dec 13, 2024
2 parents bf21a1a + f6629fb commit 2b71196
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/datastores/sql/crud/folder.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def get_root_folders_from_db(db: Session, current_user: User):
UserRole.role == Role.OWNER,
Folder.parent_id.is_(None),
)
.order_by(Folder.created_at.desc())
.all()
)

Expand Down Expand Up @@ -93,6 +94,7 @@ def get_shared_folders_from_db(db: Session, current_user: User):
),
)
.filter(UserRole.id.is_(None))
.order_by(Folder.created_at.desc())
.all()
)

Expand Down

0 comments on commit 2b71196

Please sign in to comment.