Changeset 6c152a5 in Klonkt for src/routes/guardian.js
- Timestamp:
- 07/28/2026 08:15:31 PM (6 weeks ago)
- Branches:
- main
- Children:
- 6eab7e9
- Parents:
- 742ba7e
- File:
-
- 1 edited
-
src/routes/guardian.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/routes/guardian.js
r742ba7e r6c152a5 329 329 last: guardians === null ? null : guardians <= 1, 330 330 local, 331 federates: false, // the Undo does not travel yet (§3.2, fase 4)332 331 }); 333 332 }); 334 333 335 router.post('/wards/remove', requireAuth, express.json({ limit: '4kb' }), (req, res) => {334 router.post('/wards/remove', requireAuth, express.json({ limit: '4kb' }), async (req, res) => { 336 335 const site = siteForUser(req); 337 336 if (!site) return res.status(404).json({ error: 'no_site' }); 338 337 const uri = String(req.body?.uri || '').trim(); 339 338 if (!uri) return res.status(400).json({ error: 'empty_uri' }); 340 Guardianship.removeRelation(site.slug, 'guardian', uri); 341 res.json({ ok: true }); 339 // Ending a guardianship is an Undo of the Relationship that travels to the 340 // ward and the other guardians (§3.2), not a local delete. Same call the 341 // Guardian apps reach over C2S, so the two cannot drift apart. 342 const r = await Guardianship.endGuardianship(site, uri); 343 if (r.status >= 400) return res.status(r.status).json({ error: r.error }); 344 res.json({ ok: true, delivered: r.delivered, guardiansLeft: r.guardiansLeft }); 342 345 }); 343 346
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)