Rename ApipResponse->exit* methods to better show their meaning

This commit is contained in:
Hypolite Petovan 2023-09-22 10:14:46 -04:00
parent 960171c4e0
commit 642baa1f2a
68 changed files with 88 additions and 88 deletions

View file

@ -70,13 +70,13 @@ class Seen extends BaseApi
// we found the item, return it to the user
$ret = [DI::twitterStatus()->createFromUriId($item['uri-id'], $item['uid'], $include_entities)->toArray()];
$data = ['status' => $ret];
$this->response->exit('statuses', $data, $this->parameters['extension'] ?? null);
$this->response->addFormattedContent('statuses', $data, $this->parameters['extension'] ?? null);
return;
}
// the item can't be found, but we set the notification as seen, so we count this as a success
}
$this->response->exit('statuses', ['result' => 'success'], $this->parameters['extension'] ?? null);
$this->response->addFormattedContent('statuses', ['result' => 'success'], $this->parameters['extension'] ?? null);
} catch (NotFoundException $e) {
throw new BadRequestException('Invalid argument', $e);
} catch (Exception $e) {