mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 08:42: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:
parent
19e0abcb27
commit
471e89a8b7
2 changed files with 9 additions and 0 deletions
|
@ -1052,6 +1052,10 @@ final class DifferentialRevision extends DifferentialDAO
|
||||||
->setKey('title')
|
->setKey('title')
|
||||||
->setType('string')
|
->setType('string')
|
||||||
->setDescription(pht('The revision title.')),
|
->setDescription(pht('The revision title.')),
|
||||||
|
id(new PhabricatorConduitSearchFieldSpecification())
|
||||||
|
->setKey('uri')
|
||||||
|
->setType('uri')
|
||||||
|
->setDescription(pht('View URI for the revision.')),
|
||||||
id(new PhabricatorConduitSearchFieldSpecification())
|
id(new PhabricatorConduitSearchFieldSpecification())
|
||||||
->setKey('authorPHID')
|
->setKey('authorPHID')
|
||||||
->setType('phid')
|
->setType('phid')
|
||||||
|
|
|
@ -241,6 +241,10 @@ final class PhabricatorPaste extends PhabricatorPasteDAO
|
||||||
->setKey('title')
|
->setKey('title')
|
||||||
->setType('string')
|
->setType('string')
|
||||||
->setDescription(pht('The title of the paste.')),
|
->setDescription(pht('The title of the paste.')),
|
||||||
|
id(new PhabricatorConduitSearchFieldSpecification())
|
||||||
|
->setKey('uri')
|
||||||
|
->setType('uri')
|
||||||
|
->setDescription(pht('View URI for the paste.')),
|
||||||
id(new PhabricatorConduitSearchFieldSpecification())
|
id(new PhabricatorConduitSearchFieldSpecification())
|
||||||
->setKey('authorPHID')
|
->setKey('authorPHID')
|
||||||
->setType('phid')
|
->setType('phid')
|
||||||
|
@ -259,6 +263,7 @@ final class PhabricatorPaste extends PhabricatorPasteDAO
|
||||||
public function getFieldValuesForConduit() {
|
public function getFieldValuesForConduit() {
|
||||||
return array(
|
return array(
|
||||||
'title' => $this->getTitle(),
|
'title' => $this->getTitle(),
|
||||||
|
'uri' => PhabricatorEnv::getURI($this->getURI()),
|
||||||
'authorPHID' => $this->getAuthorPHID(),
|
'authorPHID' => $this->getAuthorPHID(),
|
||||||
'language' => nonempty($this->getLanguage(), null),
|
'language' => nonempty($this->getLanguage(), null),
|
||||||
'status' => $this->getStatus(),
|
'status' => $this->getStatus(),
|
||||||
|
|
Loading…
Reference in a new issue