[object Object]

← back to Wallco Ai

wallco recolor: set dominant_hex on variants so title color matches colorway

d2af6bba85d3d3024c3ab57087d04180593f8db2 · 2026-05-26 15:21:35 -0700 · Steve Abrams

Files touched

Diff

commit d2af6bba85d3d3024c3ab57087d04180593f8db2
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Tue May 26 15:21:35 2026 -0700

    wallco recolor: set dominant_hex on variants so title color matches colorway
---
 server.js | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/server.js b/server.js
index 429c113..048a190 100644
--- a/server.js
+++ b/server.js
@@ -16455,6 +16455,7 @@ app.get('/api/subject-mismatch', (req, res) => {
 // every root that has variants queued AND no decision yet. Each row =
 // { root_id, motif, variants: [{variant, new_id, ground}] }.
 app.get('/api/luxe-curator', (req, res) => {
+  if (!isAdmin(req)) return res.status(404).json({ error: 'not found' });
   try {
     const logF = path.join(__dirname, 'data', 'luxe-curator-queue.jsonl');
     if (!fs.existsSync(logF)) return res.json({ count: 0, items: [], decided: 0 });
@@ -16652,6 +16653,7 @@ app.get('/api/luxe-c-gallery', (req, res) => {
 // Reads data/joint-fix-log.jsonl (the audit trail from scripts/joint-fix-batch.js)
 // and returns the OK rows for the source→fix gallery view.
 app.get('/api/joint-fix-gallery', (req, res) => {
+  if (!isAdmin(req)) return res.status(404).json({ error: 'not found' });
   try {
     const logF = path.join(__dirname, 'data', 'joint-fix-log.jsonl');
     if (!fs.existsSync(logF)) return res.json({ items: [] });
@@ -17580,7 +17582,8 @@ app.post('/api/generator/refresh-orders', (req, res) => {
   });
 });
 
-app.get('/api/generator/runs', (_req, res) => {
+app.get('/api/generator/runs', (req, res) => {
+  if (!isAdmin(req)) return res.status(404).json({ error: 'not found' });
   try {
     const raw = psqlQuery(`SELECT COALESCE(json_agg(t ORDER BY t.started_at DESC), '[]'::json) FROM (
       SELECT r.id, r.recipe_id, rc.name AS recipe_name, r.design_id,
@@ -18331,7 +18334,8 @@ app.get('/api/studio/category-insights', async (req, res) => {
   } catch (e) { res.status(500).json({ error: e.message }); }
 });
 
-app.get('/api/studio/elements', (_req, res) => {
+app.get('/api/studio/elements', (req, res) => {
+  if (!isAdmin(req)) return res.status(404).json({ error: 'not found' });
   try {
     const raw = psqlQuery(`SELECT COALESCE(json_agg(t ORDER BY t.category, t.name), '[]'::json) FROM
       (SELECT id, category, name, prompt_phrase FROM wallco_element_lexicon) t;`);

← 774fe30 replace-bg: accept any of the 5k library textures, not just  ·  back to Wallco Ai  ·  TODO: close catastrophic-cohort tick — edge_seam_heal --grid e59e6b0 →