File AI-detected Varaverk defects as deduped reports, surfaced on the AI tab and counted in the coffee report
This commit is contained in:
@@ -187,6 +187,20 @@ if ($action === 'clear') {
|
||||
exit;
|
||||
}
|
||||
|
||||
// ── bugs / bug_close ──────────────────────────────────────────────────────────
|
||||
// Reports the troubleshooter filed. Listing is a GET because it changes nothing; dismissing is
|
||||
// a POST, like every other mutation in this plugin.
|
||||
if ($action === 'bugs') {
|
||||
echo json_encode(['ok' => true, 'bugs' => vv_ai_bugs_list(($_GET['all'] ?? '') !== '1')]);
|
||||
exit;
|
||||
}
|
||||
if ($action === 'bug_close') {
|
||||
if (!$isPost) { http_response_code(405); echo json_encode(['ok' => false, 'error' => 'POST only']); exit; }
|
||||
$ok = vv_ai_bug_set_open(trim($_POST['id'] ?? ''), ($_POST['open'] ?? '0') === '1');
|
||||
echo json_encode(['ok' => $ok]);
|
||||
exit;
|
||||
}
|
||||
|
||||
// ── incident_add ──────────────────────────────────────────────────────────────
|
||||
// Appends one operator-written "this was the fix" note against a scope. POST only, and the
|
||||
// scope is whitelisted the same way ask's is — it is written to a file that later rides in a
|
||||
|
||||
Reference in New Issue
Block a user