mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Fixed bug with with type in returned JSON introduced in previous commit
Also removed some redundant return statements
This commit is contained in:
parent
25aea216c5
commit
c56a23d21c
2 changed files with 11 additions and 18 deletions
|
@ -66,16 +66,6 @@ async def rpc(request: Request,
|
|||
returned_data["resultcount"] = 0
|
||||
returned_data["type"] = type
|
||||
|
||||
# Ensure type is valid.
|
||||
if type is None:
|
||||
returned_data["type"] = "error"
|
||||
returned_data["error"] = "No request type/data specified."
|
||||
return returned_data
|
||||
elif type not in ("info", "multiinfo"):
|
||||
returned_data["type"] = "error"
|
||||
returned_data["error"] = "Incorrect request type specified."
|
||||
return returned_data
|
||||
|
||||
# Take arguments from either 'args' or 'args[]' and put them into 'argument_list'.
|
||||
argument_list = []
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue