mirror of
https://github.com/friendica/friendica
synced 2025-01-31 21:39:46 +00:00
Force exits in PushSubscription PUT, POST and DELETE endpoints
- These add their own content to the response, which makes rawContent() redundant
This commit is contained in:
parent
4d146c93d4
commit
f53292cb11
2 changed files with 4 additions and 4 deletions
|
@ -92,6 +92,6 @@ class UpdateCredentials extends BaseApi
|
|||
}
|
||||
|
||||
$account = DI::mstdnAccount()->createFromContactId($ucid, $uid);
|
||||
$this->response->addJsonContent($account->toArray());
|
||||
$this->jsonExit($account->toArray());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ class PushSubscription extends BaseApi
|
|||
$this->logger->info('Subscription stored', ['ret' => $ret, 'subscription' => $subscription]);
|
||||
|
||||
$subscriptionObj = $this->subscriptionFac->createForApplicationIdAndUserId($application['id'], $uid);
|
||||
$this->response->addJsonContent($subscriptionObj->toArray());
|
||||
$this->jsonExit($subscriptionObj->toArray());
|
||||
}
|
||||
|
||||
public function put(array $request = []): void
|
||||
|
@ -105,7 +105,7 @@ class PushSubscription extends BaseApi
|
|||
]);
|
||||
|
||||
$subscriptionObj = $this->subscriptionFac->createForApplicationIdAndUserId($application['id'], $uid);
|
||||
$this->response->addJsonContent($subscriptionObj->toArray());
|
||||
$this->jsonExit($subscriptionObj->toArray());
|
||||
}
|
||||
|
||||
private function setBoolean($input): bool
|
||||
|
@ -130,7 +130,7 @@ class PushSubscription extends BaseApi
|
|||
'uid' => $uid,
|
||||
]);
|
||||
|
||||
$this->response->addJsonContent([]);
|
||||
$this->jsonExit([]);
|
||||
}
|
||||
|
||||
protected function get(array $request = []): void
|
||||
|
|
Loading…
Add table
Reference in a new issue