Changeset 62b899d in Klonkt for src/routes


Ignore:
Timestamp:
06/16/2026 07:02:15 PM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
fb02cc0
Parents:
682d504
Message:

Circle: strip shortcodes from summary + "Sync all now" button

[[playlist:..]]/[[track:..]]/[[album:..]]-shortcodes survived stripHtml (not
HTML) → appeared raw in the circle summary (buggy). Now stripped on ingest
(consumer) and on publish. Also added a global sync button on
Admin → Circle.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/routes/admin-circle.js

    r682d504 r62b899d  
    1616import db from '../config/database.js';
    1717import { getTenancy } from '../services/SettingsService.js';
    18 import { syncOne } from '../services/CircleService.js';
     18import { syncOne, sync } from '../services/CircleService.js';
    1919
    2020const router = express.Router();
     
    9595});
    9696
     97// Alles in één keer verversen (handig "voor de zekerheid").
     98router.post('/sync-all', requireGod, async (req, res) => {
     99  try {
     100    const r = await sync();
     101    const n = (r && r.results) ? r.results.filter((x) => x && x.ok).length : 0;
     102    res.redirect('/admin/circle?success=' + encodeURIComponent(`Cirkel gesynchroniseerd (${n} site(s) bijgewerkt)`));
     103  } catch (e) {
     104    res.redirect('/admin/circle?error=' + encodeURIComponent(String((e && e.message) || e).slice(0, 200)));
     105  }
     106});
     107
    97108router.post('/allow', requireGod, (req, res) => {
    98109  const site = primarySite();
Note: See TracChangeset for help on using the changeset viewer.