Allow Conduit to query project slugs.
Summary: Ref T4418. Allow Conduit to query projects by their slugs. Test Plan: This functionality mostly already existed, it just wasn't exposed to the Conduit endpoint. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: epriestley, Korvin Maniphest Tasks: T4418 Differential Revision: https://secure.phabricator.com/D9456
This commit is contained in:
committed by
epriestley
parent
d1626a3bad
commit
6df8c4a426
@@ -24,6 +24,7 @@ final class ConduitAPI_project_query_Method extends ConduitAPI_project_Method {
|
||||
return array(
|
||||
'ids' => 'optional list<int>',
|
||||
'phids' => 'optional list<phid>',
|
||||
'slugs' => 'optional list<string>',
|
||||
'status' => 'optional '.$status_const,
|
||||
|
||||
'members' => 'optional list<phid>',
|
||||
@@ -38,8 +39,7 @@ final class ConduitAPI_project_query_Method extends ConduitAPI_project_Method {
|
||||
}
|
||||
|
||||
public function defineErrorTypes() {
|
||||
return array(
|
||||
);
|
||||
return array();
|
||||
}
|
||||
|
||||
protected function execute(ConduitAPIRequest $request) {
|
||||
@@ -62,6 +62,11 @@ final class ConduitAPI_project_query_Method extends ConduitAPI_project_Method {
|
||||
$query->withPHIDs($phids);
|
||||
}
|
||||
|
||||
$slugs = $request->getValue('slugs');
|
||||
if ($slugs) {
|
||||
$query->withSlugs($slugs);
|
||||
}
|
||||
|
||||
$members = $request->getValue('members');
|
||||
if ($members) {
|
||||
$query->withMemberPHIDs($members);
|
||||
|
||||
Reference in New Issue
Block a user