16 lines
351 B
PHP
16 lines
351 B
PHP
|
<?php
|
||
|
|
||
|
$_ = function() {
|
||
|
$id = trim($_GET['id']);
|
||
|
if (!valid_mastodon_account_id($id))
|
||
|
return apiresult(['error' => 'id parameter has incorrect format'], 400);
|
||
|
|
||
|
$output = instance_http_post('/api/v1/admin/accounts/'.$id.'/action',
|
||
|
['type' => 'silence' ]);
|
||
|
|
||
|
if (!isset($_SERVER['REQUEST_URI']))
|
||
|
sleep(2);
|
||
|
return apiresult($output);
|
||
|
};
|
||
|
$_();
|