mirror of
https://github.com/OPSnet/Gazelle.git
synced 2026-01-16 18:04:34 -05:00
18 lines
382 B
PHP
18 lines
382 B
PHP
<?php
|
|
/** @phpstan-var \Gazelle\User $Viewer */
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Gazelle;
|
|
|
|
if (!$Viewer->permitted('site_moderate_forums')) {
|
|
json_error('forbidden');
|
|
}
|
|
$report = new Manager\Report()->findById((int)($_POST['id'] ?? 0));
|
|
if (is_null($report)) {
|
|
json_error('bad post id');
|
|
}
|
|
$report->addNote($_POST['notes']);
|
|
|
|
print json_encode(['status' => 'success']);
|