mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 04:53:01 +00:00
🔶 add update_playlist route
This commit is contained in:
@@ -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