Changeset 8d32dcf in Klonkt for src/server.js


Ignore:
Timestamp:
06/19/2026 06:47:40 AM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
84325b8
Parents:
b9dc94c
Message:

Show agenda + notify-me (premium feature #8) — last of the 8

  • DB: shows (site_id, date, time, city, venue, country, ticket_url, notes).
  • routes/shows.js (public, premium-gated): GET /shows (upcoming shows + notify form), POST /shows/notify (subscribers source 'notify', double opt-in if SMTP; confirm/unsub via the generic /nieuwsbrief links).
  • routes/admin-shows.js (site admin + premium): GET /admin/shows (list + add form + subscriber count), POST / (add; optional notify email to 'notify' subscribers if SMTP is available), POST /:id/delete.
  • SubscriberService.confirmedFor(siteId, source?) — optional source filter ('notify').
  • views: pages/shows.ejs + pages/admin-shows.ejs. Dashboard 📅 Agenda link.

Notify email requires SMTP (like #1/#2 sending); without SMTP the show is saved
and sign-ups still work. node --check passed.

Co-Authored-By: Claude <noreply@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/server.js

    rb9dc94c r8d32dcf  
    5959import linkbioRoutes from './routes/linkbio.js';
    6060import embedRoutes from './routes/embed.js';
     61import showsRoutes from './routes/shows.js';
     62import adminShowsRoutes from './routes/admin-shows.js';
    6163
    6264if (!process.env.SESSION_SECRET) {
     
    260262app.use('/admin/stats', adminStatsRoutes);
    261263app.use('/admin/newsletter', adminNewsletterRoutes);
     264app.use('/admin/shows', adminShowsRoutes);
    262265app.use('/admin', adminRoutes);
    263266app.use('/prutter', prutterRoutes);
     
    279282app.use('/', linkbioRoutes); // /links link-in-bio + klikstats (premium)
    280283app.use('/', embedRoutes); // /embed inbedbare audiospeler (premium)
     284app.use('/', showsRoutes); // /shows agenda + notify-me (premium)
    281285app.use('/', postsRoutes);
    282286
Note: See TracChangeset for help on using the changeset viewer.