mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
RPC: Do not return an error on 0 results
Return an empty array and set the result count to zero instead. Before: $ curl 'http://localhost/rpc.php?type=search&arg=raboof' {"type":"error","resultcount":0,"results":"No results found"} After: $ curl 'http://localhost/rpc.php?type=search&arg=raboof' {"type":"search","resultcount":0,"results":[]} Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
168a51431b
commit
0557f7705a
1 changed files with 1 additions and 1 deletions
|
@ -152,7 +152,7 @@ class AurJSON {
|
||||||
return $this->json_results($type, $resultcount, $search_data);
|
return $this->json_results($type, $resultcount, $search_data);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return $this->json_error('No results found');
|
return $this->json_results($type, 0, array());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue