mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-19 13:22:42 +01:00
Conduit project.query allow query by names
Summary: The ability to query by name(s) already exists but is not bound to the conduit method. This binds it. Test Plan: Tested locally echo '{"names": ["myprojectbyname"]}' | arc call-conduit project.query Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: epriestley, Korvin, 20after4 Differential Revision: https://secure.phabricator.com/D10032
This commit is contained in:
parent
d10e25098c
commit
bb35a67a16
1 changed files with 6 additions and 0 deletions
|
@ -20,6 +20,7 @@ final class ConduitAPI_project_query_Method extends ConduitAPI_project_Method {
|
|||
|
||||
return array(
|
||||
'ids' => 'optional list<int>',
|
||||
'names' => 'optional list<string>',
|
||||
'phids' => 'optional list<phid>',
|
||||
'slugs' => 'optional list<string>',
|
||||
'status' => 'optional '.$status_const,
|
||||
|
@ -50,6 +51,11 @@ final class ConduitAPI_project_query_Method extends ConduitAPI_project_Method {
|
|||
$query->withIDs($ids);
|
||||
}
|
||||
|
||||
$names = $request->getValue('names');
|
||||
if ($names) {
|
||||
$query->withNames($names);
|
||||
}
|
||||
|
||||
$status = $request->getValue('status');
|
||||
if ($status) {
|
||||
$query->withStatus($status);
|
||||
|
|
Loading…
Reference in a new issue