From bb35a67a16dfda12d67ca33a4ee25c691ed3afd9 Mon Sep 17 00:00:00 2001 From: cpettet Date: Thu, 24 Jul 2014 14:00:12 -0700 Subject: [PATCH] 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 --- .../project/conduit/ConduitAPI_project_query_Method.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/applications/project/conduit/ConduitAPI_project_query_Method.php b/src/applications/project/conduit/ConduitAPI_project_query_Method.php index f7a451ec1e..aa05326e10 100644 --- a/src/applications/project/conduit/ConduitAPI_project_query_Method.php +++ b/src/applications/project/conduit/ConduitAPI_project_query_Method.php @@ -20,6 +20,7 @@ final class ConduitAPI_project_query_Method extends ConduitAPI_project_Method { return array( 'ids' => 'optional list', + 'names' => 'optional list', 'phids' => 'optional list', 'slugs' => 'optional list', '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);