From d75f98f842993299a4e855a9e798ee9cf0cbe203 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CNaeel=E2=80=9D?= Date: Tue, 23 Jun 2026 07:35:34 +0400 Subject: [PATCH] =?UTF-8?q?v1.0.116:=20fix=20JS=20=E2=80=94=20Lucee=20UPPE?= =?UTF-8?q?RCASE=20keys=20(ok=E2=86=92OK,=20body=E2=86=92BODY,=20versions?= =?UTF-8?q?=E2=86=92VERSIONS,=20etc.)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.cfm | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/index.cfm b/index.cfm index 141e943..ccac7e3 100644 --- a/index.cfm +++ b/index.cfm @@ -75,7 +75,7 @@
Nubes - Сверка договоров — LLM AI-driven Event Sourcing v1.0.115 — Lucee + Сверка договоров — LLM AI-driven Event Sourcing v1.0.116 — Lucee
@@ -649,9 +649,9 @@ function loadPrompt(role) { fetch('/prompt.cfm?action=get_active&role=' + role) .then(function(r) { return r.json(); }) .then(function(d) { - if (d.ok) { - promptEditor.value = d.body || ''; - activePromptId[role] = d.id || ''; + if (d.OK) { + promptEditor.value = d.BODY || ''; + activePromptId[role] = d.ID || ''; loadHistory(role); } }) @@ -662,17 +662,17 @@ function loadHistory(role) { fetch('/prompt.cfm?action=list&role=' + role) .then(function(r) { return r.json(); }) .then(function(d) { - if (!d.ok || !d.versions || !d.versions.length) { + if (!d.OK || !d.VERSIONS || !d.VERSIONS.length) { promptHistory.innerHTML = '
нет версий
'; return; } - promptHistory.innerHTML = d.versions.map(function(v) { - var isActive = v.is_active ? '✓ ' : ''; - var style = v.is_active ? 'font-weight:600;' : ''; + promptHistory.innerHTML = d.VERSIONS.map(function(v) { + var isActive = v.IS_ACTIVE ? '✓ ' : ''; + var style = v.IS_ACTIVE ? 'font-weight:600;' : ''; return '
' - + '' + isActive + escHtml(v.name) + ' ' + fmtDate(v.created_at) + '' - + (!v.is_active ? '' : '') - + (!v.is_active ? '' : '') + + '' + isActive + escHtml(v.NAME) + ' ' + fmtDate(v.CREATED_AT) + '' + + (!v.IS_ACTIVE ? '' : '') + + (!v.IS_ACTIVE ? '' : '') + '
'; }).join(''); }) @@ -690,8 +690,8 @@ function activatePrompt(id) { }) .then(function(r) { return r.json(); }) .then(function(d) { - if (d.ok) { loadPrompt(promptRole); promptStatus.textContent = '✓ активирован'; } - else { promptStatus.textContent = '✕ ' + (d.error || 'ошибка'); } + if (d.OK) { loadPrompt(promptRole); promptStatus.textContent = '✓ активирован'; } + else { promptStatus.textContent = '✕ ' + (d.ERROR || 'ошибка'); } }); } @@ -704,8 +704,8 @@ function deletePrompt(id) { }) .then(function(r) { return r.json(); }) .then(function(d) { - if (d.ok) { loadHistory(promptRole); promptStatus.textContent = '✓ удалено'; } - else { promptStatus.textContent = '✕ ' + (d.error || 'ошибка'); } + if (d.OK) { loadHistory(promptRole); promptStatus.textContent = '✓ удалено'; } + else { promptStatus.textContent = '✕ ' + (d.ERROR || 'ошибка'); } }); } @@ -724,12 +724,12 @@ document.getElementById('promptSave').addEventListener('click', function() { }) .then(function(r) { return r.json(); }) .then(function(d) { - if (d.ok) { + if (d.OK) { promptStatus.textContent = '✓ сохранено (новая версия)'; promptName.value = ''; promptNotes.value = ''; loadPrompt(promptRole); } else { - promptStatus.textContent = '✕ ' + (d.error || 'ошибка'); + promptStatus.textContent = '✕ ' + (d.ERROR || 'ошибка'); } }); });