1
0
mirror of https://github.com/spl0k/supysonic.git synced 2024-12-23 01:16:18 +00:00

Return a correct error when the client parameter isn't supplied

This commit is contained in:
spl0k 2017-10-16 19:57:09 +02:00
parent 534a6de4a0
commit 4d3809a835

View File

@ -81,6 +81,9 @@ def get_client_prefs():
if not request.path.startswith('/rest/'): if not request.path.startswith('/rest/'):
return return
if 'c' not in request.values:
return request.error_formatter(10, 'Missing required parameter')
client = request.values.get('c') client = request.values.get('c')
prefs = store.get(ClientPrefs, (request.user.id, client)) prefs = store.get(ClientPrefs, (request.user.id, client))
if not prefs: if not prefs: