fix: verbessere Benutzerzuweisung für Playstore-Review-Konto
All checks were successful
Code Analysis and Production Deploy / analyze (push) Successful in 5m48s
Code Analysis and Production Deploy / deploy-production (push) Has been skipped
Code Analysis and Production Deploy / deploy-test (push) Successful in 2m42s

This commit is contained in:
Torsten Schulz (local)
2026-10-29 22:13:46 +01:00
parent 472bec4519
commit c550fe8581

View File

@@ -28,11 +28,13 @@ if (user && !process.env.PLAYSTORE_REVIEW_PASSWORD) {
user = { id: crypto.randomUUID(), email, created: new Date().toISOString() } user = { id: crypto.randomUUID(), email, created: new Date().toISOString() }
users.push(user) users.push(user)
} }
Object.assign(user, { user.name = 'Google Play Review'
name: 'Google Play Review', password: await hashPassword(password), user.password = await hashPassword(password)
roles: ['mitglied'], active: true, hidden: true, accountType: 'playstore_review', user.roles = ['mitglied']
visibility: { showBirthday: false } user.active = true
}) user.hidden = true
user.accountType = 'playstore_review'
user.visibility = { showBirthday: false }
delete user.role delete user.role
await fs.copyFile(file, `${file}.before-playstore-${Date.now()}`) await fs.copyFile(file, `${file}.before-playstore-${Date.now()}`)
if (!await writeUsers(users)) throw new Error('Review-Konto konnte nicht gespeichert werden') if (!await writeUsers(users)) throw new Error('Review-Konto konnte nicht gespeichert werden')