Make BaseModule a real entity

- Add all dependencies, necessary to run the content (baseUrl, Arguments)
- Encapsulate all POST/GET/DELETE/PATCH/PUT methods as protected methods inside the BaseModule
- Return Module content ONLY per `BaseModule::run()` (including the Hook logic there as well)
This commit is contained in:
Philipp 2021-11-20 15:38:03 +01:00
parent 238613fd01
commit 8bdd90066f
No known key found for this signature in database
GPG key ID: 24A7501396EB5432
252 changed files with 615 additions and 623 deletions

View file

@ -35,7 +35,7 @@ class Accounts extends BaseApi
/**
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public function rawContent()
protected function rawContent(array $request = [])
{
$uid = self::getCurrentUserID();

View file

@ -32,7 +32,7 @@ use Friendica\Module\BaseApi;
*/
class Block extends BaseApi
{
public function post()
protected function post(array $request = [], array $post = [])
{
self::checkAllowedScope(self::SCOPE_FOLLOW);
$uid = self::getCurrentUserID();

View file

@ -32,7 +32,7 @@ class FeaturedTags extends BaseApi
/**
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public function rawContent()
protected function rawContent(array $request = [])
{
self::checkAllowedScope(self::SCOPE_READ);

View file

@ -31,7 +31,7 @@ use Friendica\Module\BaseApi;
*/
class Follow extends BaseApi
{
public function post()
protected function post(array $request = [], array $post = [])
{
self::checkAllowedScope(self::SCOPE_FOLLOW);
$uid = self::getCurrentUserID();

View file

@ -34,7 +34,7 @@ class Followers extends BaseApi
/**
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public function rawContent()
protected function rawContent(array $request = [])
{
self::checkAllowedScope(self::SCOPE_READ);
$uid = self::getCurrentUserID();

View file

@ -34,7 +34,7 @@ class Following extends BaseApi
/**
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public function rawContent()
protected function rawContent(array $request = [])
{
self::checkAllowedScope(self::SCOPE_READ);
$uid = self::getCurrentUserID();

View file

@ -32,7 +32,7 @@ class IdentityProofs extends BaseApi
/**
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public function rawContent()
protected function rawContent(array $request = [])
{
self::checkAllowedScope(self::SCOPE_READ);

View file

@ -35,7 +35,7 @@ class Lists extends BaseApi
/**
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public function rawContent()
protected function rawContent(array $request = [])
{
self::checkAllowedScope(self::SCOPE_READ);
$uid = self::getCurrentUserID();

View file

@ -31,7 +31,7 @@ use Friendica\Module\BaseApi;
*/
class Mute extends BaseApi
{
public function post()
protected function post(array $request = [], array $post = [])
{
self::checkAllowedScope(self::SCOPE_FOLLOW);
$uid = self::getCurrentUserID();

View file

@ -32,7 +32,7 @@ use Friendica\Module\BaseApi;
*/
class Note extends BaseApi
{
public function post()
protected function post(array $request = [], array $post = [])
{
self::checkAllowedScope(self::SCOPE_WRITE);
$uid = self::getCurrentUserID();

View file

@ -34,7 +34,7 @@ class Relationships extends BaseApi
/**
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public function rawContent()
protected function rawContent(array $request = [])
{
self::checkAllowedScope(self::SCOPE_READ);
$uid = self::getCurrentUserID();

View file

@ -37,7 +37,7 @@ class Search extends BaseApi
/**
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public function rawContent()
protected function rawContent(array $request = [])
{
self::checkAllowedScope(self::SCOPE_READ);
$uid = self::getCurrentUserID();

View file

@ -39,7 +39,7 @@ class Statuses extends BaseApi
/**
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public function rawContent()
protected function rawContent(array $request = [])
{
$uid = self::getCurrentUserID();

View file

@ -31,7 +31,7 @@ use Friendica\Module\BaseApi;
*/
class Unblock extends BaseApi
{
public function post()
protected function post(array $request = [], array $post = [])
{
self::checkAllowedScope(self::SCOPE_FOLLOW);
$uid = self::getCurrentUserID();

View file

@ -31,7 +31,7 @@ use Friendica\Module\BaseApi;
*/
class Unfollow extends BaseApi
{
public function post()
protected function post(array $request = [], array $post = [])
{
self::checkAllowedScope(self::SCOPE_FOLLOW);
$uid = self::getCurrentUserID();

View file

@ -31,7 +31,7 @@ use Friendica\Module\BaseApi;
*/
class Unmute extends BaseApi
{
public function post()
protected function post(array $request = [], array $post = [])
{
self::checkAllowedScope(self::SCOPE_FOLLOW);
$uid = self::getCurrentUserID();

View file

@ -32,7 +32,7 @@ use Friendica\Util\HTTPInputData;
*/
class UpdateCredentials extends BaseApi
{
public function patch()
protected function patch()
{
self::checkAllowedScope(self::SCOPE_WRITE);
$uid = self::getCurrentUserID();

View file

@ -35,7 +35,7 @@ class VerifyCredentials extends BaseApi
/**
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public function rawContent()
protected function rawContent(array $request = [])
{
self::checkAllowedScope(self::SCOPE_READ);
$uid = self::getCurrentUserID();

View file

@ -32,7 +32,7 @@ class Announcements extends BaseApi
/**
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public function rawContent()
protected function rawContent(array $request = [])
{
self::checkAllowedScope(self::SCOPE_READ);

View file

@ -35,7 +35,7 @@ class Apps extends BaseApi
/**
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public function post()
protected function post(array $request = [], array $post = [])
{
$request = self::getRequest([
'client_name' => '',

View file

@ -30,7 +30,7 @@ use Friendica\Module\BaseApi;
*/
class VerifyCredentials extends BaseApi
{
public function rawContent()
protected function rawContent(array $request = [])
{
self::checkAllowedScope(self::SCOPE_READ);
$application = self::getCurrentApplication();

View file

@ -34,7 +34,7 @@ class Blocks extends BaseApi
/**
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public function rawContent()
protected function rawContent(array $request = [])
{
self::checkAllowedScope(self::SCOPE_READ);
$uid = self::getCurrentUserID();

View file

@ -36,7 +36,7 @@ class Bookmarks extends BaseApi
/**
* @throws HTTPException\InternalServerErrorException
*/
public function rawContent()
protected function rawContent(array $request = [])
{
self::checkAllowedScope(self::SCOPE_READ);
$uid = self::getCurrentUserID();

View file

@ -31,7 +31,7 @@ use Friendica\Module\BaseApi;
*/
class Conversations extends BaseApi
{
public function delete()
protected function delete()
{
self::checkAllowedScope(self::SCOPE_WRITE);
$uid = self::getCurrentUserID();
@ -49,7 +49,7 @@ class Conversations extends BaseApi
/**
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public function rawContent()
protected function rawContent(array $request = [])
{
self::checkAllowedScope(self::SCOPE_READ);
$uid = self::getCurrentUserID();

View file

@ -31,7 +31,7 @@ use Friendica\Module\BaseApi;
*/
class Read extends BaseApi
{
public function post()
protected function post(array $request = [], array $post = [])
{
self::checkAllowedScope(self::SCOPE_WRITE);
$uid = self::getCurrentUserID();

View file

@ -37,7 +37,7 @@ class CustomEmojis extends BaseApi
* @throws \ImagickException
* @see https://docs.joinmastodon.org/methods/accounts/follow_requests#pending-follows
*/
public function rawContent()
protected function rawContent(array $request = [])
{
$emojis = DI::mstdnEmoji()->createCollectionFromSmilies(Smilies::getList());

View file

@ -39,7 +39,7 @@ class Directory extends BaseApi
* @throws \ImagickException
* @see https://docs.joinmastodon.org/methods/instance/directory/
*/
public function rawContent()
protected function rawContent(array $request = [])
{
$request = self::getRequest([
'offset' => 0, // How many accounts to skip before returning results. Default 0.

View file

@ -32,7 +32,7 @@ class Endorsements extends BaseApi
/**
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public function rawContent()
protected function rawContent(array $request = [])
{
System::jsonExit([]);
}

View file

@ -37,7 +37,7 @@ class Favourited extends BaseApi
/**
* @throws HTTPException\InternalServerErrorException
*/
public function rawContent()
protected function rawContent(array $request = [])
{
self::checkAllowedScope(self::SCOPE_READ);
$uid = self::getCurrentUserID();

View file

@ -31,7 +31,7 @@ use Friendica\Module\BaseApi;
*/
class Filters extends BaseApi
{
public function post()
public function post(array $request = [], array $post = [])
{
self::checkAllowedScope(self::SCOPE_WRITE);
@ -41,7 +41,7 @@ class Filters extends BaseApi
/**
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public function rawContent()
protected function rawContent(array $request = [])
{
self::checkAllowedScope(self::SCOPE_READ);

View file

@ -42,7 +42,7 @@ class FollowRequests extends BaseApi
* @see https://docs.joinmastodon.org/methods/accounts/follow_requests#accept-follow
* @see https://docs.joinmastodon.org/methods/accounts/follow_requests#reject-follow
*/
public function post()
protected function post(array $request = [], array $post = [])
{
self::checkAllowedScope(self::SCOPE_FOLLOW);
$uid = self::getCurrentUserID();
@ -82,7 +82,7 @@ class FollowRequests extends BaseApi
* @throws \ImagickException
* @see https://docs.joinmastodon.org/methods/accounts/follow_requests/
*/
public function rawContent()
protected function rawContent(array $request = [])
{
self::checkAllowedScope(self::SCOPE_READ);
$uid = self::getCurrentUserID();

View file

@ -33,7 +33,7 @@ class Instance extends BaseApi
/**
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public function rawContent()
protected function rawContent(array $request = [])
{
System::jsonExit(InstanceEntity::get());
}

View file

@ -36,7 +36,7 @@ class Peers extends BaseApi
/**
* @throws HTTPException\InternalServerErrorException
*/
public function rawContent()
protected function rawContent(array $request = [])
{
$return = [];

View file

@ -36,7 +36,7 @@ class Rules extends BaseApi
/**
* @throws HTTPException\InternalServerErrorException
*/
public function rawContent()
protected function rawContent(array $request = [])
{
$rules = [];
$id = 0;

View file

@ -31,7 +31,7 @@ use Friendica\Model\Group;
*/
class Lists extends BaseApi
{
public function delete()
protected function delete()
{
self::checkAllowedScope(self::SCOPE_WRITE);
$uid = self::getCurrentUserID();
@ -51,7 +51,7 @@ class Lists extends BaseApi
System::jsonExit([]);
}
public function post()
protected function post(array $request = [], array $post = [])
{
self::checkAllowedScope(self::SCOPE_WRITE);
$uid = self::getCurrentUserID();
@ -91,7 +91,7 @@ class Lists extends BaseApi
/**
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public function rawContent()
protected function rawContent(array $request = [])
{
self::checkAllowedScope(self::SCOPE_READ);
$uid = self::getCurrentUserID();

View file

@ -35,12 +35,12 @@ use Friendica\Module\BaseApi;
*/
class Accounts extends BaseApi
{
public function delete()
protected function delete()
{
DI::apiResponse()->unsupported(Router::DELETE);
}
public function post()
protected function post(array $request = [], array $post = [])
{
DI::apiResponse()->unsupported(Router::POST);
}
@ -48,7 +48,7 @@ class Accounts extends BaseApi
/**
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public function rawContent()
protected function rawContent(array $request = [])
{
self::checkAllowedScope(self::SCOPE_READ);
$uid = self::getCurrentUserID();

View file

@ -31,7 +31,7 @@ use Friendica\Module\BaseApi;
*/
class Markers extends BaseApi
{
public function post()
protected function post(array $request = [], array $post = [])
{
self::checkAllowedScope(self::SCOPE_WRITE);
@ -41,7 +41,7 @@ class Markers extends BaseApi
/**
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public function rawContent()
protected function rawContent(array $request = [])
{
self::checkAllowedScope(self::SCOPE_READ);

View file

@ -32,7 +32,7 @@ use Friendica\Module\BaseApi;
*/
class Media extends BaseApi
{
public function post()
protected function post(array $request = [], array $post = [])
{
self::checkAllowedScope(self::SCOPE_WRITE);
$uid = self::getCurrentUserID();
@ -82,7 +82,7 @@ class Media extends BaseApi
/**
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public function rawContent()
protected function rawContent(array $request = [])
{
self::checkAllowedScope(self::SCOPE_READ);
$uid = self::getCurrentUserID();

View file

@ -34,7 +34,7 @@ class Mutes extends BaseApi
/**
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public function rawContent()
protected function rawContent(array $request = [])
{
self::checkAllowedScope(self::SCOPE_READ);
$uid = self::getCurrentUserID();

View file

@ -40,7 +40,7 @@ class Notifications extends BaseApi
/**
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public function rawContent()
protected function rawContent(array $request = [])
{
self::checkAllowedScope(self::SCOPE_READ);
$uid = self::getCurrentUserID();

View file

@ -30,7 +30,7 @@ use Friendica\Module\BaseApi;
*/
class Clear extends BaseApi
{
public function post()
protected function post(array $request = [], array $post = [])
{
self::checkAllowedScope(self::SCOPE_WRITE);
$uid = self::getCurrentUserID();

View file

@ -32,7 +32,7 @@ use Friendica\Network\HTTPException\ForbiddenException;
*/
class Dismiss extends BaseApi
{
public function post()
protected function post(array $request = [], array $post = [])
{
self::checkAllowedScope(self::SCOPE_WRITE);
$uid = self::getCurrentUserID();

View file

@ -34,7 +34,7 @@ class Preferences extends BaseApi
/**
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public function rawContent()
protected function rawContent(array $request = [])
{
self::checkAllowedScope(self::SCOPE_READ);
$uid = self::getCurrentUserID();

View file

@ -32,7 +32,7 @@ class Proofs extends BaseApi
/**
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public function rawContent()
protected function rawContent(array $request = [])
{
System::jsonError(404, ['error' => 'Record not found']);
}

View file

@ -33,7 +33,7 @@ use Friendica\Object\Api\Mastodon\Notification;
*/
class PushSubscription extends BaseApi
{
public function post()
protected function post(array $request = [], array $post = [])
{
self::checkAllowedScope(self::SCOPE_PUSH);
$uid = self::getCurrentUserID();
@ -99,7 +99,7 @@ class PushSubscription extends BaseApi
return DI::mstdnSubscription()->createForApplicationIdAndUserId($application['id'], $uid)->toArray();
}
public function delete()
protected function delete()
{
self::checkAllowedScope(self::SCOPE_PUSH);
$uid = self::getCurrentUserID();
@ -112,7 +112,7 @@ class PushSubscription extends BaseApi
System::jsonExit([]);
}
public function rawContent()
protected function rawContent(array $request = [])
{
self::checkAllowedScope(self::SCOPE_PUSH);
$uid = self::getCurrentUserID();

View file

@ -42,7 +42,7 @@ class ScheduledStatuses extends BaseApi
DI::apiResponse()->unsupported(Router::PUT);
}
public function delete()
protected function delete()
{
self::checkAllowedScope(self::SCOPE_WRITE);
$uid = self::getCurrentUserID();
@ -63,7 +63,7 @@ class ScheduledStatuses extends BaseApi
/**
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public function rawContent()
protected function rawContent(array $request = [])
{
self::checkAllowedScope(self::SCOPE_READ);
$uid = self::getCurrentUserID();

View file

@ -40,7 +40,7 @@ class Search extends BaseApi
/**
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public function rawContent()
protected function rawContent(array $request = [])
{
self::checkAllowedScope(self::SCOPE_READ);
$uid = self::getCurrentUserID();

View file

@ -41,7 +41,7 @@ use Friendica\Util\Images;
*/
class Statuses extends BaseApi
{
public function post()
protected function post(array $request = [], array $post = [])
{
self::checkAllowedScope(self::SCOPE_WRITE);
$uid = self::getCurrentUserID();
@ -207,7 +207,7 @@ class Statuses extends BaseApi
DI::mstdnError()->InternalError();
}
public function delete()
protected function delete()
{
self::checkAllowedScope(self::SCOPE_READ);
$uid = self::getCurrentUserID();
@ -231,7 +231,7 @@ class Statuses extends BaseApi
/**
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public function rawContent()
protected function rawContent(array $request = [])
{
$uid = self::getCurrentUserID();

View file

@ -33,7 +33,7 @@ use Friendica\Module\BaseApi;
*/
class Bookmark extends BaseApi
{
public function post()
protected function post(array $request = [], array $post = [])
{
self::checkAllowedScope(self::SCOPE_WRITE);
$uid = self::getCurrentUserID();

View file

@ -35,7 +35,7 @@ class Card extends BaseApi
/**
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public function rawContent()
protected function rawContent(array $request = [])
{
$uid = self::getCurrentUserID();

View file

@ -35,7 +35,7 @@ class Context extends BaseApi
/**
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public function rawContent()
protected function rawContent(array $request = [])
{
$uid = self::getCurrentUserID();

View file

@ -33,7 +33,7 @@ use Friendica\Module\BaseApi;
*/
class Favourite extends BaseApi
{
public function post()
protected function post(array $request = [], array $post = [])
{
self::checkAllowedScope(self::SCOPE_WRITE);
$uid = self::getCurrentUserID();

View file

@ -35,7 +35,7 @@ class FavouritedBy extends BaseApi
/**
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public function rawContent()
protected function rawContent(array $request = [])
{
$uid = self::getCurrentUserID();

View file

@ -32,7 +32,7 @@ use Friendica\Module\BaseApi;
*/
class Mute extends BaseApi
{
public function post()
protected function post(array $request = [], array $post = [])
{
self::checkAllowedScope(self::SCOPE_WRITE);
$uid = self::getCurrentUserID();

View file

@ -32,7 +32,7 @@ use Friendica\Module\BaseApi;
*/
class Pin extends BaseApi
{
public function post()
protected function post(array $request = [], array $post = [])
{
self::checkAllowedScope(self::SCOPE_WRITE);
$uid = self::getCurrentUserID();

View file

@ -35,7 +35,7 @@ use Friendica\Module\BaseApi;
*/
class Reblog extends BaseApi
{
public function post()
protected function post(array $request = [], array $post = [])
{
self::checkAllowedScope(self::SCOPE_WRITE);
$uid = self::getCurrentUserID();

View file

@ -35,7 +35,7 @@ class RebloggedBy extends BaseApi
/**
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public function rawContent()
protected function rawContent(array $request = [])
{
$uid = self::getCurrentUserID();

View file

@ -33,7 +33,7 @@ use Friendica\Module\BaseApi;
*/
class Unbookmark extends BaseApi
{
public function post()
protected function post(array $request = [], array $post = [])
{
self::checkAllowedScope(self::SCOPE_WRITE);
$uid = self::getCurrentUserID();

View file

@ -33,7 +33,7 @@ use Friendica\Module\BaseApi;
*/
class Unfavourite extends BaseApi
{
public function post()
protected function post(array $request = [], array $post = [])
{
self::checkAllowedScope(self::SCOPE_WRITE);
$uid = self::getCurrentUserID();

View file

@ -32,7 +32,7 @@ use Friendica\Module\BaseApi;
*/
class Unmute extends BaseApi
{
public function post()
protected function post(array $request = [], array $post = [])
{
self::checkAllowedScope(self::SCOPE_WRITE);
$uid = self::getCurrentUserID();

View file

@ -32,7 +32,7 @@ use Friendica\Module\BaseApi;
*/
class Unpin extends BaseApi
{
public function post()
protected function post(array $request = [], array $post = [])
{
self::checkAllowedScope(self::SCOPE_WRITE);
$uid = self::getCurrentUserID();

View file

@ -35,7 +35,7 @@ use Friendica\Module\BaseApi;
*/
class Unreblog extends BaseApi
{
public function post()
protected function post(array $request = [], array $post = [])
{
self::checkAllowedScope(self::SCOPE_WRITE);
$uid = self::getCurrentUserID();

View file

@ -34,7 +34,7 @@ class Suggestions extends BaseApi
/**
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public function rawContent()
protected function rawContent(array $request = [])
{
self::checkAllowedScope(self::SCOPE_READ);
$uid = self::getCurrentUserID();

View file

@ -35,7 +35,7 @@ class Direct extends BaseApi
/**
* @throws HTTPException\InternalServerErrorException
*/
public function rawContent()
protected function rawContent(array $request = [])
{
self::checkAllowedScope(self::SCOPE_READ);
$uid = self::getCurrentUserID();

View file

@ -36,7 +36,7 @@ class Home extends BaseApi
/**
* @throws HTTPException\InternalServerErrorException
*/
public function rawContent()
protected function rawContent(array $request = [])
{
self::checkAllowedScope(self::SCOPE_READ);
$uid = self::getCurrentUserID();

View file

@ -36,7 +36,7 @@ class ListTimeline extends BaseApi
/**
* @throws HTTPException\InternalServerErrorException
*/
public function rawContent()
protected function rawContent(array $request = [])
{
self::checkAllowedScope(self::SCOPE_READ);
$uid = self::getCurrentUserID();

View file

@ -39,7 +39,7 @@ class PublicTimeline extends BaseApi
/**
* @throws HTTPException\InternalServerErrorException
*/
public function rawContent()
protected function rawContent(array $request = [])
{
$uid = self::getCurrentUserID();

View file

@ -37,7 +37,7 @@ class Tag extends BaseApi
/**
* @throws HTTPException\InternalServerErrorException
*/
public function rawContent()
protected function rawContent(array $request = [])
{
self::checkAllowedScope(self::SCOPE_READ);
$uid = self::getCurrentUserID();

View file

@ -34,7 +34,7 @@ class Trends extends BaseApi
/**
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public function rawContent()
protected function rawContent(array $request = [])
{
$request = self::getRequest([
'limit' => 20, // Maximum number of results to return. Defaults to 10.

View file

@ -33,7 +33,7 @@ class Unimplemented extends BaseApi
/**
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public function delete()
protected function delete()
{
DI::apiResponse()->unsupported(Router::DELETE);
}
@ -41,7 +41,7 @@ class Unimplemented extends BaseApi
/**
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public function patch()
protected function patch()
{
DI::apiResponse()->unsupported(Router::PATCH);
}
@ -49,7 +49,7 @@ class Unimplemented extends BaseApi
/**
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public function post()
protected function post(array $request = [], array $post = [])
{
DI::apiResponse()->unsupported(Router::POST);
}
@ -65,7 +65,7 @@ class Unimplemented extends BaseApi
/**
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public function rawContent()
protected function rawContent(array $request = [])
{
DI::apiResponse()->unsupported(Router::GET);
}