1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 14:52:41 +01:00

Add "uri" to "paste.search" API output

Summary: Ref T13490. This simplifies some client behavior in the general case.

Test Plan: Called API method, saw URIs.

Maniphest Tasks: T13490

Differential Revision: https://secure.phabricator.com/D21105
This commit is contained in:
epriestley 2020-04-13 14:14:32 -07:00
parent 19e0abcb27
commit 471e89a8b7
2 changed files with 9 additions and 0 deletions

View file

@ -1052,6 +1052,10 @@ final class DifferentialRevision extends DifferentialDAO
->setKey('title')
->setType('string')
->setDescription(pht('The revision title.')),
id(new PhabricatorConduitSearchFieldSpecification())
->setKey('uri')
->setType('uri')
->setDescription(pht('View URI for the revision.')),
id(new PhabricatorConduitSearchFieldSpecification())
->setKey('authorPHID')
->setType('phid')

View file

@ -241,6 +241,10 @@ final class PhabricatorPaste extends PhabricatorPasteDAO
->setKey('title')
->setType('string')
->setDescription(pht('The title of the paste.')),
id(new PhabricatorConduitSearchFieldSpecification())
->setKey('uri')
->setType('uri')
->setDescription(pht('View URI for the paste.')),
id(new PhabricatorConduitSearchFieldSpecification())
->setKey('authorPHID')
->setType('phid')
@ -259,6 +263,7 @@ final class PhabricatorPaste extends PhabricatorPasteDAO
public function getFieldValuesForConduit() {
return array(
'title' => $this->getTitle(),
'uri' => PhabricatorEnv::getURI($this->getURI()),
'authorPHID' => $this->getAuthorPHID(),
'language' => nonempty($this->getLanguage(), null),
'status' => $this->getStatus(),