This commit is contained in:
2026-02-03 02:57:19 +01:00
parent b215ba3b60
commit 5c2efaafa5
2 changed files with 26 additions and 1 deletions

View File

@@ -1 +1 @@
1.2.24
1.2.25

View File

@@ -1299,6 +1299,19 @@ class ApiKernel
if (!$row) $this->fail('Not found', ['id' => $versionId], 404);
$ok = $this->activateContentVersion($customerId, (int)$row['content_id'], $versionId);
debug_log_write('templates_toggle', [
'time' => date(DATE_ATOM),
'action' => 'content_versions.activate',
'customer_id' => $customerId,
'content_id' => (int)$row['content_id'],
'version_id' => $versionId,
'ok' => $ok,
'input' => $this->in,
], [
'append' => true,
'json' => true,
'newline' => true,
]);
if (!$ok) $this->fail('Activation failed', ['id' => $versionId], 500);
$this->respond(['ok' => true, 'activated' => true, 'id' => $versionId]);
}
@@ -1312,6 +1325,18 @@ class ApiKernel
if ($contentId <= 0) $this->fail('content_id required', null, 422);
$ok = $this->deactivateContentVersion($customerId, $contentId);
debug_log_write('templates_toggle', [
'time' => date(DATE_ATOM),
'action' => 'content_versions.deactivate',
'customer_id' => $customerId,
'content_id' => $contentId,
'ok' => $ok,
'input' => $this->in,
], [
'append' => true,
'json' => true,
'newline' => true,
]);
if (!$ok) $this->fail('Deactivation failed', ['content_id' => $contentId], 500);
$this->respond(['ok' => true, 'deactivated' => true, 'content_id' => $contentId]);
}