Postfach/Team-Verwaltung/Supporter-Abo als Node.js/Express-Server portiert
Vollständiger 1:1-Port des cloudflare-worker/ (dogfather-universe-postfach) auf server-internal/: Bewerbungs-Postfach mit Rollen/Rechten, Team- Zugangsverwaltung (verschlüsselte Owner-only-Codes), DogiCrew-Supporter-Abo (PayPal Subscriptions, Google-Login, Resend-E-Mail, 30-Monats-Prämienzyklus) und automatische TikTok-Live-Erkennung. D1 -> better-sqlite3, Cloudflare- Cron -> node-cron. Läuft ohne gesetzte Secrets weiter (PayPal/Google/Resend/ Ticketanizer/Discord bleiben "nicht konfiguriert" statt kaputt), bis die echten Zugangsdaten eingetragen werden.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
/* =====================================================================
|
||||
audit.js — Aktivitätsprotokoll. 1:1 portiert, D1 → better-sqlite3.
|
||||
WICHTIG: Codes dürfen hier NIEMALS im Klartext auftauchen.
|
||||
===================================================================== */
|
||||
import { db } from "../db.js";
|
||||
import { nowIso } from "./crypto.js";
|
||||
|
||||
export function logAction(actor, action, target, detail) {
|
||||
db.prepare(`INSERT INTO audit_log (actor, action, target, detail, created_at) VALUES (?, ?, ?, ?, ?)`).run(
|
||||
actor,
|
||||
action,
|
||||
target || null,
|
||||
detail ? JSON.stringify(detail) : null,
|
||||
nowIso()
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user