Changeset e61c289 in Klonkt for src/routes
- Timestamp:
- 07/24/2026 05:03:34 PM (7 weeks ago)
- Branches:
- main
- Children:
- 318d0c2
- Parents:
- 6b5d7da
- File:
-
- 1 edited
-
src/routes/activitypub.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/routes/activitypub.js
r6b5d7da re61c289 19 19 import { apEnabled } from '../services/SettingsService.js'; 20 20 import OAuth from '../services/OAuthService.js'; 21 import * as Guardianship from '../services/guardianship/index.js'; 21 22 import multer from 'multer'; 22 23 import path from 'path'; … … 108 109 }); 109 110 }); 111 112 // ── Guardian queues (owner only, FEP-633c, shaer:queues) ────────── 113 // The dashboard collections the Shaer clients read: pending adoption offers, 114 // gated follows (empty in Klonkt for now) and the guardian's wards. Same 115 // contract as the Shaer test daemon. 116 function queueRoute(name, build) { 117 router.get(`/ap/users/:slug/queues/${name}`, (req, res) => { 118 const auth = OAuth.verifyBearer(req.headers.authorization); 119 if (!auth || auth.site.slug !== req.params.slug) return res.status(403).end(); 120 const base = baseUrl(req); 121 const me = `${base}/ap/users/${auth.site.slug}`; 122 AP.sendAP(res, { '@context': AP.AP_CONTEXT, ...build(`${me}/queues/${name}`, auth.site.slug, me) }); 123 }); 124 } 125 queueRoute('offers', (id, slug, me) => Guardianship.offersCollection(id, slug, me)); 126 queueRoute('follows', (id) => Guardianship.followsCollection(id)); 127 queueRoute('wards', (id, slug) => Guardianship.wardsCollection(id, slug)); 110 128 111 129 // ── Inbox read (owner only, AP C2S) ───────────────────────────────
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)