Changeset eefd302 in Klonkt for src/routes
- Timestamp:
- 06/26/2026 05:04:49 PM (2 months ago)
- Branches:
- main
- Children:
- cf4cf27
- Parents:
- 69e7a79
- File:
-
- 1 edited
-
src/routes/posts.js (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/routes/posts.js
r69e7a79 reefd302 85 85 'tag', 'type', 'user', 'users', 'artiesten', 'leden', 'favorieten', 'feed.xml', 'atom.xml', 'sitemap.xml', 86 86 'manifest.webmanifest', 'sw.js', 'favicon.ico', 'favicon.svg', 'assets', 87 'authorize_interaction', 'fediverse', 'news paper', 'following', 'notifications', 'blocking',87 'authorize_interaction', 'fediverse', 'news', 'following', 'notifications', 'blocking', 88 88 ]); 89 89 … … 614 614 } 615 615 616 router.get('/news paper', requireSiteManager, (req, res) => {616 router.get('/news', requireSiteManager, (req, res) => { 617 617 const site = res.locals.site; 618 618 const cspOrigins = new Set(); … … 635 635 } 636 636 } 637 renderPage(req, res, 'pages/news paper', {638 pageTitle: 'News paper', bodyClass: 'on-special',637 renderPage(req, res, 'pages/news', { 638 pageTitle: 'News', bodyClass: 'on-special', 639 639 timeline, 640 640 success: req.query.success || null, error: req.query.error || null, … … 653 653 }); 654 654 655 router.post('/news paper/follow', requireSiteManager, async (req, res) => {655 router.post('/news/follow', requireSiteManager, async (req, res) => { 656 656 const site = res.locals.site; 657 657 const handle = (req.body.handle || '').toString(); … … 669 669 }); 670 670 671 router.post('/news paper/unfollow', requireSiteManager, async (req, res) => {671 router.post('/news/unfollow', requireSiteManager, async (req, res) => { 672 672 const site = res.locals.site; 673 673 const actorUri = (req.body.actor_uri || '').toString(); … … 677 677 678 678 // Toggle "Featured" (show this account's posts in your Cirkel) on an account you follow. 679 router.post('/news paper/autoboost', requireSiteManager, (req, res) => {679 router.post('/news/autoboost', requireSiteManager, (req, res) => { 680 680 const site = res.locals.site; 681 681 const actorUri = (req.body.actor_uri || '').toString(); … … 684 684 }); 685 685 686 router.post('/news paper/like', requireSiteManager, async (req, res) => {686 router.post('/news/like', requireSiteManager, async (req, res) => { 687 687 const site = res.locals.site; 688 688 if (site) { try { await ActivityPubService.sendInteraction(site, 'like', (req.body.note || '').toString(), (req.body.author || '').toString()); } catch (e) { /* ignore */ } } 689 res.redirect('/news paper?success=' + encodeURIComponent('Geliket ⭐'));690 }); 691 692 router.post('/news paper/boost', requireSiteManager, async (req, res) => {689 res.redirect('/news?success=' + encodeURIComponent('Geliket ⭐')); 690 }); 691 692 router.post('/news/boost', requireSiteManager, async (req, res) => { 693 693 const site = res.locals.site; 694 694 const note = (req.body.note || '').toString(); … … 697 697 ActivityPubService.markBoosted(site.slug, note); // also surface it in the Cirkel (mixed by date) 698 698 } 699 res.redirect('/news paper?success=' + encodeURIComponent('Geboost 🔁'));699 res.redirect('/news?success=' + encodeURIComponent('Geboost 🔁')); 700 700 }); 701 701 702 702 // Unboost (retract): send Undo(Announce) + clear the local flag. 703 router.post('/news paper/unboost', requireSiteManager, async (req, res) => {703 router.post('/news/unboost', requireSiteManager, async (req, res) => { 704 704 const site = res.locals.site; 705 705 const note = (req.body.note || '').toString(); … … 708 708 ActivityPubService.unmarkBoosted(site.slug, note); 709 709 } 710 res.redirect('/news paper?success=' + encodeURIComponent('Boost ingetrokken'));710 res.redirect('/news?success=' + encodeURIComponent('Boost ingetrokken')); 711 711 }); 712 712 … … 739 739 } 740 740 const ref = req.get('Referer') || ''; 741 res.redirect((ref.includes('/news paper') ? '/newspaper?' : '/blocking?') + q);741 res.redirect((ref.includes('/news') ? '/news?' : '/blocking?') + q); 742 742 }); 743 743
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)