mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-10 00:54:27 +02:00
Move jsonError out of Factory\Api\Mastodon\Error->UnprocessableEntity
This commit is contained in:
parent
7f846f153d
commit
7486ebdc10
52 changed files with 76 additions and 73 deletions
|
@ -37,7 +37,7 @@ class Lists extends BaseApi
|
|||
$uid = self::getCurrentUserID();
|
||||
|
||||
if (empty($this->parameters['id'])) {
|
||||
DI::mstdnError()->UnprocessableEntity();
|
||||
$this->logErrorAndJsonExit(422, $this->errorFactory->UnprocessableEntity());
|
||||
}
|
||||
|
||||
if (!Circle::exists($this->parameters['id'], $uid)) {
|
||||
|
@ -61,7 +61,7 @@ class Lists extends BaseApi
|
|||
], $request);
|
||||
|
||||
if (empty($request['title'])) {
|
||||
DI::mstdnError()->UnprocessableEntity();
|
||||
$this->logErrorAndJsonExit(422, $this->errorFactory->UnprocessableEntity());
|
||||
}
|
||||
|
||||
Circle::create($uid, $request['title']);
|
||||
|
@ -82,7 +82,7 @@ class Lists extends BaseApi
|
|||
], $request);
|
||||
|
||||
if (empty($request['title']) || empty($this->parameters['id'])) {
|
||||
DI::mstdnError()->UnprocessableEntity();
|
||||
$this->logErrorAndJsonExit(422, $this->errorFactory->UnprocessableEntity());
|
||||
}
|
||||
|
||||
Circle::update($this->parameters['id'], $request['title']);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue