mirror of
https://github.com/friendica/friendica
synced 2025-04-26 02:30:11 +00:00
Move jsonError out of Factory\Api\Mastodon\Error->RecordNotFound
This commit is contained in:
parent
9e71610711
commit
7f846f153d
36 changed files with 68 additions and 56 deletions
|
@ -94,7 +94,7 @@ class PushSubscription extends BaseApi
|
|||
$subscription = Subscription::select($application['id'], $uid, ['id']);
|
||||
if (empty($subscription)) {
|
||||
$this->logger->info('Subscription not found', ['application-id' => $application['id'], 'uid' => $uid]);
|
||||
$this->errorFactory->RecordNotFound();
|
||||
$this->logErrorAndJsonExit(404, $this->errorFactory->RecordNotFound());
|
||||
}
|
||||
|
||||
$fields = [
|
||||
|
@ -145,7 +145,7 @@ class PushSubscription extends BaseApi
|
|||
|
||||
if (!Subscription::exists($application['id'], $uid)) {
|
||||
$this->logger->info('Subscription not found', ['application-id' => $application['id'], 'uid' => $uid]);
|
||||
$this->errorFactory->RecordNotFound();
|
||||
$this->logErrorAndJsonExit(404, $this->errorFactory->RecordNotFound());
|
||||
}
|
||||
|
||||
$this->logger->info('Fetch subscription', ['application-id' => $application['id'], 'uid' => $uid]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue