1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 09:18:48 +02: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:
cpettet 2014-07-24 14:00:12 -07:00 committed by epriestley
parent d10e25098c
commit bb35a67a16

View file

@ -20,6 +20,7 @@ final class ConduitAPI_project_query_Method extends ConduitAPI_project_Method {
return array( return array(
'ids' => 'optional list<int>', 'ids' => 'optional list<int>',
'names' => 'optional list<string>',
'phids' => 'optional list<phid>', 'phids' => 'optional list<phid>',
'slugs' => 'optional list<string>', 'slugs' => 'optional list<string>',
'status' => 'optional '.$status_const, 'status' => 'optional '.$status_const,
@ -50,6 +51,11 @@ final class ConduitAPI_project_query_Method extends ConduitAPI_project_Method {
$query->withIDs($ids); $query->withIDs($ids);
} }
$names = $request->getValue('names');
if ($names) {
$query->withNames($names);
}
$status = $request->getValue('status'); $status = $request->getValue('status');
if ($status) { if ($status) {
$query->withStatus($status); $query->withStatus($status);