Skip to content
This repository has been archived by the owner on Nov 24, 2022. It is now read-only.

Commit

Permalink
Fix undefined stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
hanss314 committed Jan 15, 2018
1 parent dbd18a4 commit 2d51e4f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion website/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ def delete():

requests.delete(f'http://localhost:8088/{guild_id}', data={'position': player_id})
queue = requests.get(f'http://localhost:8088/{guild_id}/playlist').json()
queue = [(player['title'], player['user']) for player in queue]
data = {
'code': 1000,
'msg': 'Queue read successful',
Expand All @@ -117,6 +116,7 @@ def delete():
'queue': queue
}
}
print(data)
return json.dumps(data)

@app.route('/queue', methods=['POST'])
Expand Down
6 changes: 1 addition & 5 deletions website/templates/queue.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,7 @@
'guild': guild
},
success: function (data, textStatus) {
console.log(data);
console.log(textStatus);

var response = jQuery.parseJSON(data);

if (response['code'] === 1000) {
show_queue(response['d']['queue'], response['d']['queue_length']);
}
Expand All @@ -85,7 +81,7 @@
function show_queue(q, length) {
queue = q;
$('#container').html('');
console.log(length);
console.log(q);
for (var i = 0; i < length; i++) {
card = '<div class="card" title="' + q[i]['id'] + '">';
if (mod) {card += '<div class="skip-button" title="Remove song">x</div>';}
Expand Down

0 comments on commit 2d51e4f

Please sign in to comment.