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:
Hypolite Petovan 2025-01-04 21:49:05 -05:00
parent 4d146c93d4
commit f53292cb11
2 changed files with 4 additions and 4 deletions

View file

@ -92,6 +92,6 @@ class UpdateCredentials extends BaseApi
}
$account = DI::mstdnAccount()->createFromContactId($ucid, $uid);
$this->response->addJsonContent($account->toArray());
$this->jsonExit($account->toArray());
}
}

View file

@ -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