$note = $this->getNotes()->load($guid, false);
if ($note === null) {
- return new ErrorResponse('Note does not exist');
+ $res = new ErrorResponse('Note does not exist');
+ $res->setStatus(\OCP\AppFramework\Http::STATUS_NOT_FOUND);
+ return $res;
}
$converter = new \OCA\Grauphel\Converter\Html();
'note' => $note,
'note-content' => $contentHtml,
'links' => array(
+ 'html' => $this->urlGen->linkToRoute(
+ 'grauphel.notes.html', array('guid' => $guid)
+ ),
'json' => $this->urlGen->linkToRoute(
'grauphel.api.note', array(
'guid' => $guid, 'username' => $this->user->getUid()
)
),
+ 'text' => $this->urlGen->linkToRoute(
+ 'grauphel.notes.text', array('guid' => $guid)
+ ),
'xml' => $this->urlGen->linkToRoute(
'grauphel.notes.xml', array('guid' => $guid)
),