Rename BaseApi->logErrorAndJsonExit to logAndJsonError to better match the functionality

- Also it's shorter and we're paying by the character
This commit is contained in:
Hypolite Petovan 2023-10-11 09:37:49 -04:00
parent eb583330df
commit 1b9ec3a214
57 changed files with 128 additions and 128 deletions

View file

@ -70,7 +70,7 @@ class Apps extends BaseApi
}
if (empty($request['client_name']) || empty($request['redirect_uris'])) {
$this->logErrorAndJsonExit(422, $this->errorFactory->UnprocessableEntity($this->t('Missing parameters')));
$this->logAndJsonError(422, $this->errorFactory->UnprocessableEntity($this->t('Missing parameters')));
}
$client_id = bin2hex(random_bytes(32));
@ -92,7 +92,7 @@ class Apps extends BaseApi
}
if (!DBA::insert('application', $fields)) {
$this->logErrorAndJsonExit(500, $this->errorFactory->InternalError());
$this->logAndJsonError(500, $this->errorFactory->InternalError());
}
$this->jsonExit(DI::mstdnApplication()->createFromApplicationId(DBA::lastInsertId())->toArray());