From ec3b79bb61cd9af484159fed88436a19b68c3cb4 Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Mon, 20 Apr 2026 09:02:20 +0200 Subject: [PATCH] PocketBase Bot: fix field names notes_json -> notes, install_methods_json -> install_methods Collection fields were renamed but bot still used old _json suffixed names. --- .github/workflows/pocketbase-bot.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pocketbase-bot.yml b/.github/workflows/pocketbase-bot.yml index 2d5ce52c8..1faf1ac96 100644 --- a/.github/workflows/pocketbase-bot.yml +++ b/.github/workflows/pocketbase-bot.yml @@ -337,8 +337,8 @@ jobs: if (infoMatch) { // ── INFO SUBCOMMAND ────────────────────────────────────────────── - const notesArr = readJsonBlob(record.notes_json); - const methodsArr = readJsonBlob(record.install_methods_json); + const notesArr = readJsonBlob(record.notes); + const methodsArr = readJsonBlob(record.install_methods); const out = []; out.push('ℹ️ **PocketBase Bot**: Info for **`' + slug + '`**\n'); @@ -382,13 +382,13 @@ jobs: // ── NOTE SUBCOMMAND ────────────────────────────────────────────── const noteAction = noteMatch[1].toLowerCase(); const noteArgsStr = rest.substring(noteMatch[0].length).trim(); - let notesArr = readJsonBlob(record.notes_json); + let notesArr = readJsonBlob(record.notes); async function patchNotes(arr) { const res = await request(recordsUrl + '/' + record.id, { method: 'PATCH', headers: { 'Authorization': token, 'Content-Type': 'application/json' }, - body: JSON.stringify({ notes_json: arr }) + body: JSON.stringify({ notes: arr }) }); if (!res.ok) { await addReaction('-1'); @@ -504,7 +504,7 @@ jobs: // ── METHOD SUBCOMMAND ──────────────────────────────────────────── const methodArgs = rest.replace(/^method\s*/i, '').trim(); const methodListMode = !methodArgs || methodArgs.toLowerCase() === 'list'; - let methodsArr = readJsonBlob(record.install_methods_json); + let methodsArr = readJsonBlob(record.install_methods); // Method field classification const RESOURCE_KEYS = { cpu: 'number', ram: 'number', hdd: 'number', os: 'string', version: 'string' }; @@ -526,7 +526,7 @@ jobs: const res = await request(recordsUrl + '/' + record.id, { method: 'PATCH', headers: { 'Authorization': token, 'Content-Type': 'application/json' }, - body: JSON.stringify({ install_methods_json: arr }) + body: JSON.stringify({ install_methods: arr }) }); if (!res.ok) { await addReaction('-1');