*/
protected function rawContent(array $request = [])
{
- self::checkAllowedScope(self::SCOPE_READ);
+ $this->checkAllowedScope(self::SCOPE_READ);
$uid = self::getCurrentUserID();
if (empty($this->parameters['id'])) {
- DI::mstdnError()->UnprocessableEntity();
+ $this->logErrorAndJsonExit(422, $this->errorFactory->UnprocessableEntity());
}
$id = $this->parameters['id'];
if (!DBA::exists('contact', ['id' => $id, 'uid' => 0])) {
- DI::mstdnError()->RecordNotFound();
+ $this->logErrorAndJsonExit(404, $this->errorFactory->RecordNotFound());
}
$request = $this->getRequest([
}
self::setLinkHeader();
- System::jsonExit($accounts);
+ $this->jsonExit($accounts);
}
}