From 74f787695508a478ac2bf6216e8a8e07444a1f2d Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 10 Apr 2026 22:20:06 +0000 Subject: [PATCH] Fix social sync: update post_title and post_url on existing posts Previously only INSERT included these fields, UPDATE ignored them. Chronicler #76 --- services/arbiter-3.0/src/routes/api.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/services/arbiter-3.0/src/routes/api.js b/services/arbiter-3.0/src/routes/api.js index db48934..03a72e4 100644 --- a/services/arbiter-3.0/src/routes/api.js +++ b/services/arbiter-3.0/src/routes/api.js @@ -78,6 +78,18 @@ router.post('/social/sync', async (req, res) => { const updateValues = []; let paramIndex = 1; + // Update title and URL if provided + if (post_title) { + updateFields.push(`post_title = $${paramIndex}`); + updateValues.push(post_title); + paramIndex++; + } + if (post_url) { + updateFields.push(`post_url = $${paramIndex}`); + updateValues.push(post_url); + paramIndex++; + } + // Build dynamic update based on provided metrics if (metrics) { const metricFields = [