soselo/api/v1/http/mastodon/accounts/silence/mod.php

16 lines
351 B
PHP
Raw Normal View History

<?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);
};
$_();