fix return value for cancelDownloads, fixes #114

This commit is contained in:
j 2016-01-16 12:33:58 +05:30
parent 6692e9f3a8
commit 6838a2f0f2

View file

@ -302,7 +302,7 @@ def download(data):
if item: if item:
item.queue_download() item.queue_download()
item.update() item.update()
response = {'status': 'queued'} response = {'queued': data['id']}
return response return response
actions.register(download, cache=False) actions.register(download, cache=False)
@ -327,7 +327,7 @@ def cancelDownloads(data):
for l in item.lists.filter_by(user_id=settings.USER_ID): for l in item.lists.filter_by(user_id=settings.USER_ID):
l.items.remove(item) l.items.remove(item)
item.update() item.update()
response = {'status': 'cancelled'} response = {'cancelled': ids}
return response return response
actions.register(cancelDownloads, cache=False) actions.register(cancelDownloads, cache=False)