Changeset 62b899d in Klonkt for src/routes
- Timestamp:
- 06/16/2026 07:02:15 PM (3 months ago)
- Branches:
- main
- Children:
- fb02cc0
- Parents:
- 682d504
- File:
-
- 1 edited
-
src/routes/admin-circle.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/routes/admin-circle.js
r682d504 r62b899d 16 16 import db from '../config/database.js'; 17 17 import { getTenancy } from '../services/SettingsService.js'; 18 import { syncOne } from '../services/CircleService.js';18 import { syncOne, sync } from '../services/CircleService.js'; 19 19 20 20 const router = express.Router(); … … 95 95 }); 96 96 97 // Alles in één keer verversen (handig "voor de zekerheid"). 98 router.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 97 108 router.post('/allow', requireGod, (req, res) => { 98 109 const site = primarySite();
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)