Skip to content

Commit

Permalink
✨ sort files alpha #33
Browse files Browse the repository at this point in the history
  • Loading branch information
Wytamma committed Feb 15, 2024
1 parent 38ef7a0 commit c34d492
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/beastiary/api/endpoints/explorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def list_directory(path: Optional[str] = None) -> dict:
if not name.startswith(".")
]

sorted_files = sorted(files)
sorted_files = sorted(files, key=lambda d: d["name"])
sorted_folders = sorted(sorted_files, key=lambda d: d["is_dir"], reverse=True)

directory = {
Expand Down

0 comments on commit c34d492

Please sign in to comment.