diff --git a/backend/src/app.py b/backend/src/app.py index dd6bab0..9df787a 100644 --- a/backend/src/app.py +++ b/backend/src/app.py @@ -181,13 +181,11 @@ def add_song(): add_song_in_db(song) - # if song.uuid + ## add the song in the room if does not exists + if song.uuid not in room.songs: + room.songs[song.uuid] = (song, 1) # start with one vote - room.songs # TODO: add in room list - - ## HERE: add song in the room list - - return {"artist": info.artist, "title": info.title, "tags": info.tags, "image_id": info.img_id} + return {"success": True, "song": song} @app.get("/api/room/suggestions")