' parameter has incorrect format'], 400); $action = trim($_GET['action']); if (!in_array($action, ['silence', 'sensible', 'suspend'])) apiresult(['error' => ' parameter has an incorrect value'], 400); $action_data = [ 'software' => 'mastodon', 'instance' => $GLOBALS['ap_instance'], 'action' => 'accounts:'.$action, 'id' => $id, ]; $filename = md5(json_encode($action_data)); $result = filedb_put('cron/actions', $filename, serialize($action_data)); if ($result) apiresult(['ok' => 'action has been succesfully scheduled']); apiresult(['error' => 'could not create the action job'], 500);