Changeset a66266d in Klonkt for src/routes/activitypub.js
- Timestamp:
- 08/07/2026 07:23:50 PM (5 weeks ago)
- Branches:
- main
- Children:
- 9588b51
- Parents:
- 72d8eff (diff), a39c9bd (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 edited
-
src/routes/activitypub.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/routes/activitypub.js
r72d8eff ra66266d 630 630 }); 631 631 632 // ── Playlist als dereferenceerbare AP-collectie (shaer-ayc) ─────── 633 // De eerste stap van het Funkwhale-spoor: een playlist heeft een id, dus een 634 // stabiele URI. Alleen het fedi_open-deel staat erin (de poort is per bestand 635 // en eenrichtings; zie setAudioFediOpen in routes/posts.js) — een collectie 636 // zonder open tracks bestaat wel maar is leeg, want de playlist zelf is niet 637 // geheim, alleen de bestanden erachter. 638 // De lijst van alle playlist-collecties (shaer-ayc, stap 2). De actor wijst 639 // hierheen via AS2 `streams`. Kaal standaard; verrijkte stubs op verzoek 640 // (FEP-9876), dezelfde conventie als followers/following. 641 router.get('/ap/users/:slug/playlists', (req, res) => { 642 const site = publicSite(req.params.slug); 643 if (!site) return res.status(404).end(); 644 AP.sendAP(res, AP.listPlaylistsAP(baseUrl(req), site, wantsEnriched(req, res))); 645 }); 646 647 router.get('/ap/users/:slug/playlists/:id', (req, res) => { 648 const site = publicSite(req.params.slug); 649 if (!site) return res.status(404).end(); 650 const pl = db.prepare('SELECT id, title, artist, year, cover_url, kind FROM playlists WHERE id = ? AND site_id = ?') 651 .get(req.params.id, site.id); 652 if (!pl) return res.status(404).end(); 653 AP.sendAP(res, AP.buildPlaylistCollection(baseUrl(req), site, pl, AP.playlistOpenTracks(pl.id))); 654 }); 655 632 656 // ── Note ────────────────────────────────────────────────────────── 633 657 router.get('/ap/notes/:id', async (req, res) => {
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)