Spaces:
Running
Running
Nrighton233j commited on
Commit ·
54fc903
1
Parent(s): f02ed19
add firndsbin app.py
Browse files
app.py
CHANGED
|
@@ -618,8 +618,9 @@ def shares_thread(user_id, friend_id):
|
|
| 618 |
@require_internal
|
| 619 |
def group_playlists_create():
|
| 620 |
d = request.get_json(force=True)
|
|
|
|
| 621 |
playlist_id = database.create_group_playlist(
|
| 622 |
-
d["name"], d["created_by"],
|
| 623 |
)
|
| 624 |
return jsonify({"ok": True, "data": {"id": playlist_id}})
|
| 625 |
|
|
|
|
| 618 |
@require_internal
|
| 619 |
def group_playlists_create():
|
| 620 |
d = request.get_json(force=True)
|
| 621 |
+
ids = [u for u in d.get("member_ids", []) if database.are_friends(d["created_by"], u)]
|
| 622 |
playlist_id = database.create_group_playlist(
|
| 623 |
+
d["name"], d["created_by"], ids, d.get("art")
|
| 624 |
)
|
| 625 |
return jsonify({"ok": True, "data": {"id": playlist_id}})
|
| 626 |
|