forked from Gardener/ShareX_Storage
return bad request on missing acc param instead of 500
This commit is contained in:
parent
0bf1d470da
commit
a62e7bc6de
@ -47,7 +47,7 @@ def sizeof_fmt(num, suffix='B'):
|
||||
async def prepare(_, handler):
|
||||
async def prepare_handler(req):
|
||||
if 'acc' not in req.match_info:
|
||||
return web.Response(text='internal server error', status=500)
|
||||
return web.Response(text='bad request', status=400)
|
||||
return await handler(req, req.match_info["acc"], file_db[req.match_info["acc"]])
|
||||
return prepare_handler
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user