Changeset 8d32dcf in Klonkt for src/config/database.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/config/database.js

    rb9dc94c r8d32dcf  
    228228  `);
    229229
     230  // Show-agenda (premium #8): tourdata/optredens per site.
     231  db.exec(`
     232    CREATE TABLE IF NOT EXISTS shows (
     233      id TEXT PRIMARY KEY,
     234      site_id TEXT NOT NULL,
     235      date TEXT NOT NULL,
     236      time TEXT,
     237      city TEXT NOT NULL,
     238      venue TEXT,
     239      country TEXT,
     240      ticket_url TEXT,
     241      notes TEXT,
     242      created_at DATETIME DEFAULT CURRENT_TIMESTAMP
     243    );
     244    CREATE INDEX IF NOT EXISTS idx_shows_site_date ON shows(site_id, date);
     245  `);
     246
    230247  // Link-in-bio klikstatistiek (premium #6). Per (site, url) een teller; de
    231248  // link-in-bio-pagina linkt via /links/go/:i dat de klik telt en doorstuurt.
Note: See TracChangeset for help on using the changeset viewer.