Add public/private news system with homepage display

This commit is contained in:
Torsten Schulz (local)
2025-10-21 15:26:28 +02:00
parent f0b628d746
commit 72c1039aa3
28 changed files with 272 additions and 126 deletions

View File

@@ -1,5 +1,6 @@
import { promises } from 'fs';
import path from 'path';
import { randomUUID } from 'crypto';
const getDataPath = (filename) => {
const cwd = process.cwd();
@@ -54,8 +55,9 @@ async function saveMember(memberData) {
}
} else {
const newMember = {
id: `m${Date.now()}`,
...memberData
...memberData,
id: randomUUID()
// Cryptographically secure unique ID
};
members.push(newMember);
}