mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 08:52:39 +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:
parent
19e0abcb27
commit
471e89a8b7
2 changed files with 9 additions and 0 deletions
|
@ -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')
|
||||
|
|
|
@ -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(),
|
||||
|
|
Loading…
Reference in a new issue