Füge ESM-Importe und Skriptbeschreibung für das Aufteilen von Namen in Benutzer- und Bewerbungsdateien hinzu
Some checks failed
Code Analysis (JS/Vue) / analyze (push) Failing after 46s

This commit is contained in:
Torsten Schulz (local)
2026-02-14 16:25:29 +01:00
parent 161618f6fb
commit 9a6d32dcb3
2 changed files with 14 additions and 6 deletions

View File

@@ -1,9 +1,13 @@
#!/usr/bin/env node
// Script to split name field in membership application JSON files under server/data/membership-applications/
// Script to split name field in membership application JSON files under server/data/membership-applications/ (ESM)
// It will create backups for each modified file.
const fs = require('fs')
const path = require('path')
import fs from 'fs'
import path from 'path'
import { fileURLToPath } from 'url'
const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const APPS_DIR = path.join(__dirname, '../server/data/membership-applications')

View File

@@ -1,10 +1,14 @@
#!/usr/bin/env node
// Script: split-names-in-users.js
// Script: split-names-in-users.js (ESM)
// Splittet das Feld "name" in firstName und lastName für alle User in users.json, falls noch nicht vorhanden.
// Backup wird automatisch angelegt.
const fs = require('fs')
const path = require('path')
import fs from 'fs'
import path from 'path'
import { fileURLToPath } from 'url'
const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const usersPath = path.join(__dirname, '../server/data/users.json')
const backupPath = usersPath + '.bak.' + new Date().toISOString().replace(/[:.]/g, '-')