Fixed static leftovers from #10975

This commit is contained in:
Philipp 2021-11-14 23:32:01 +01:00
parent 5879535822
commit cca1be21a3
No known key found for this signature in database
GPG key ID: 24A7501396EB5432
2 changed files with 5 additions and 4 deletions

View file

@ -22,6 +22,7 @@
namespace Friendica\Module\Api\Friendica\Group;
use Friendica\Database\DBA;
use Friendica\DI;
use Friendica\Model\Group;
use Friendica\Module\BaseApi;
use Friendica\Network\HTTPException\BadRequestException;
@ -31,7 +32,7 @@ use Friendica\Network\HTTPException\BadRequestException;
*/
class Delete extends BaseApi
{
public static function rawContent(array $parameters = [])
public function rawContent()
{
self::checkAllowedScope(self::SCOPE_WRITE);
$uid = self::getCurrentUserID();
@ -69,7 +70,7 @@ class Delete extends BaseApi
if ($ret) {
// return success
$success = ['success' => $ret, 'gid' => $request['gid'], 'name' => $request['name'], 'status' => 'deleted', 'wrong users' => []];
self::exit('group_delete', ['$result' => $success], $parameters['extension'] ?? null);
DI::apiResponse()->exit('group_delete', ['$result' => $success], $parameters['extension'] ?? null);
} else {
throw new BadRequestException('other API error');
}

View file

@ -31,7 +31,7 @@ use Friendica\Module\Register;
*/
class Config extends BaseApi
{
public static function rawContent(array $parameters = [])
public function rawContent()
{
$config = [
'site' => [
@ -61,6 +61,6 @@ class Config extends BaseApi
],
];
self::exit('config', ['config' => $config], $parameters['extension'] ?? null);
DI::apiResponse()->exit('config', ['config' => $config], $this->parameters['extension'] ?? null);
}
}