class Accounts extends BaseApi
{
/**
- * @param array $parameters
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
- public static function rawContent(array $parameters = [])
+ public function rawContent()
{
$uid = self::getCurrentUserID();
- if (empty($parameters['id']) && empty($parameters['name'])) {
+ if (empty(static::$parameters['id']) && empty(static::$parameters['name'])) {
DI::mstdnError()->UnprocessableEntity();
}
- if (!empty($parameters['id'])) {
- $id = $parameters['id'];
+ if (!empty(static::$parameters['id'])) {
+ $id = static::$parameters['id'];
if (!DBA::exists('contact', ['id' => $id, 'uid' => 0])) {
DI::mstdnError()->RecordNotFound();
}
} else {
- $contact = Contact::selectFirst(['id'], ['nick' => $parameters['name'], 'uid' => 0]);
+ $contact = Contact::selectFirst(['id'], ['nick' => static::$parameters['name'], 'uid' => 0]);
if (!empty($contact['id'])) {
$id = $contact['id'];
- } elseif (!($id = Contact::getIdForURL($parameters['name'], 0, false))) {
+ } elseif (!($id = Contact::getIdForURL(static::$parameters['name'], 0, false))) {
DI::mstdnError()->RecordNotFound();
}
}