Changeset 0ca7e9a4 in Klonkt for src/routes
- Timestamp:
- 07/31/2026 05:43:16 PM (6 weeks ago)
- Branches:
- main
- Children:
- bfa6fa1
- Parents:
- f434294
- File:
-
- 1 edited
-
src/routes/admin-sites.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/routes/admin-sites.js
rf434294 r0ca7e9a4 296 296 error: req.query.error || null, 297 297 }); 298 }); 299 300 // ==================== MOVE (FEP-7628, slice 2) ==================== 301 // The explicit departure: announce to every follower that this account now 302 // lives elsewhere. Deliberately its own POST with its own button, never a 303 // side effect of Save: a Move is a door you close behind you. 304 router.post('/:slug/move', requireSiteManagerBySlug, async (req, res) => { 305 const site = db.prepare('SELECT * FROM sites WHERE slug = ?').get(req.params.slug); 306 if (!site) return res.redirect('/admin/sites?error=Not+found'); 307 const r = await AP.moveAccount(site, req.body.move_target || ''); 308 if (r && r.ok) { 309 return res.redirect(`/admin/sites/${req.params.slug}/edit?success=` + encodeURIComponent(`Verhuizing aangekondigd naar ${r.target} (${r.inboxes} inboxen).`)); 310 } 311 const msg = { 312 guarded_account: 'Dit account heeft guardians; verhuizen kan pas als de guardianship mee kan (shaer-tge).', 313 no_backreference: 'Het nieuwe profiel claimt dit account niet in zijn aliassen. Zet daar eerst dit adres als alias.', 314 not_found: 'Nieuw adres niet gevonden. Gebruik @naam@server of een actor-URL.', 315 unreachable: 'Het nieuwe profiel is niet bereikbaar.', 316 self: 'Dat is dit account zelf.', 317 }[r && r.error] || 'Verhuizen mislukte; probeer het opnieuw.'; 318 res.redirect(`/admin/sites/${req.params.slug}/edit?error=` + encodeURIComponent(msg)); 298 319 }); 299 320
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)