mirror of
https://github.com/friendica/friendica
synced 2025-04-22 06:30:11 +00:00
Rename ApipResponse->exit* methods to better show their meaning
This commit is contained in:
parent
960171c4e0
commit
642baa1f2a
68 changed files with 88 additions and 88 deletions
|
@ -105,6 +105,6 @@ class UpdateCredentials extends BaseApi
|
|||
}
|
||||
|
||||
$account = DI::mstdnAccount()->createFromContactId($cdata['user'], $uid);
|
||||
$this->response->exitWithJson($account->toArray());
|
||||
$this->response->addJsonContent($account->toArray());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,6 +52,6 @@ class VerifyCredentials extends BaseApi
|
|||
|
||||
// @todo Support the source property,
|
||||
$account = DI::mstdnAccount()->createFromContactId($cdata['user'], $uid);
|
||||
$this->response->exitWithJson($account->toArray());
|
||||
$this->response->addJsonContent($account->toArray());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -81,7 +81,7 @@ class PushSubscription extends BaseApi
|
|||
$this->logger->info('Subscription stored', ['ret' => $ret, 'subscription' => $subscription]);
|
||||
|
||||
$subscriptionObj = $this->subscriptionFac->createForApplicationIdAndUserId($application['id'], $uid);
|
||||
$this->response->exitWithJson($subscriptionObj->toArray());
|
||||
$this->response->addJsonContent($subscriptionObj->toArray());
|
||||
}
|
||||
|
||||
public function put(array $request = []): void
|
||||
|
@ -120,7 +120,7 @@ class PushSubscription extends BaseApi
|
|||
]);
|
||||
|
||||
$subscriptionObj = $this->subscriptionFac->createForApplicationIdAndUserId($application['id'], $uid);
|
||||
$this->response->exitWithJson($subscriptionObj->toArray());
|
||||
$this->response->addJsonContent($subscriptionObj->toArray());
|
||||
}
|
||||
|
||||
protected function delete(array $request = []): void
|
||||
|
@ -137,7 +137,7 @@ class PushSubscription extends BaseApi
|
|||
'uid' => $uid,
|
||||
]);
|
||||
|
||||
$this->response->exitWithJson([]);
|
||||
$this->response->addJsonContent([]);
|
||||
}
|
||||
|
||||
protected function rawContent(array $request = []): void
|
||||
|
@ -154,6 +154,6 @@ class PushSubscription extends BaseApi
|
|||
$this->logger->info('Fetch subscription', ['application-id' => $application['id'], 'uid' => $uid]);
|
||||
|
||||
$subscriptionObj = $this->subscriptionFac->createForApplicationIdAndUserId($application['id'], $uid);
|
||||
$this->response->exitWithJson($subscriptionObj->toArray());
|
||||
$this->response->addJsonContent($subscriptionObj->toArray());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue