Restyle Add edit playlist modal (#28)

* Restyled by black

* Restyled by clang-format

* Restyled by isort

* Restyled by prettier

* Restyled by prettier-markdown

* Restyled by reorder-python-imports

* Restyled by whitespace

* Restyled by yapf

Co-authored-by: Restyled.io <[email protected]>
This commit is contained in:
restyled-io[bot]andRestyled.io authored and GitHub committed 2022-04-09 02:19:27 +03:00
1 parent bf6aaea4ff
commit 2e512bc223
7 files changed
+21 -6

No files matched your search

+3 -1
View File
@@ -2,6 +2,7 @@
Contains all the playlist routes.
"""
from datetime import datetime
from app import api
from app import exceptions
from app import instances
@@ -20,7 +21,8 @@ TrackExistsInPlaylist = exceptions.TrackExistsInPlaylist
@playlist_bp.route("/playlists", methods=["GET"])
def get_all_playlists():
playlists = [
serializer.Playlist(p, construct_last_updated=False) for p in api.PLAYLISTS
serializer.Playlist(p, construct_last_updated=False)
for p in api.PLAYLISTS
]
playlists.sort(
key=lambda p: datetime.strptime(p.lastUpdated, "%Y-%m-%d %H:%M:%S"),