mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-10-29 10:34:42 +00:00
🔶 add update_playlist route
This commit is contained in:
1 parent
6cf9a58d6d
commit
0e946974a3
6 files changed
+101
-18
No files matched your search
@@ -58,3 +58,12 @@ class Playlists(db.Mongo):
|
||||
"""
|
||||
playlist = self.collection.find_one({"name": name})
|
||||
return convert_one(playlist)
|
||||
|
||||
def update_playlist(self, playlistid: str, playlist: dict) -> None:
|
||||
"""
|
||||
Updates a playlist.
|
||||
"""
|
||||
return self.collection.update_one(
|
||||
{"_id": ObjectId(playlistid)},
|
||||
{"$set": playlist},
|
||||
)
|
||||
Reference in new issue
Block a user