soselo/api/v1/http/mastodon/accounts/suspend/index.php

12 lines
368 B
PHP
Raw Normal View History

<?php chdir('../../../../../../') ?>
<?php require 'base.php' ?>
<?php
$id = trim($_GET['id']);
if (!valid_mastodon_account_id($id))
apiresult(['error' => 'id parameter has incorrect format'], 400);
instance_http_post('/api/v1/admin/accounts/'.$id.'/action',['type' => 'suspend']);
$output = instance_http_delete('/api/v1/admin/accounts/'.$id);
apiresult($output);