Füge Geburtstags-Widget hinzu und implementiere Geburtstagsladefunktion; erweitere Sichtbarkeitseinstellungen für Geburtstage in Profil und API
Some checks failed
Code Analysis (JS/Vue) / analyze (push) Failing after 49s
Some checks failed
Code Analysis (JS/Vue) / analyze (push) Failing after 49s
This commit is contained in:
@@ -60,7 +60,7 @@ export default defineEventHandler(async (event) => {
|
||||
user.phone = phone || ''
|
||||
|
||||
// Optional visibility preferences (what to show to other logged-in members)
|
||||
// Expected shape: { showEmail: boolean, showPhone: boolean, showAddress: boolean }
|
||||
// Expected shape: { showEmail: boolean, showPhone: boolean, showAddress: boolean, showBirthday: boolean }
|
||||
const visibility = body.visibility || body.visibilityPreferences || null
|
||||
if (visibility && typeof visibility === 'object') {
|
||||
user.visibility = user.visibility || {}
|
||||
@@ -68,6 +68,7 @@ export default defineEventHandler(async (event) => {
|
||||
if (visibility.showEmail !== undefined) user.visibility.showEmail = Boolean(visibility.showEmail)
|
||||
if (visibility.showPhone !== undefined) user.visibility.showPhone = Boolean(visibility.showPhone)
|
||||
if (visibility.showAddress !== undefined) user.visibility.showAddress = Boolean(visibility.showAddress)
|
||||
if (visibility.showBirthday !== undefined) user.visibility.showBirthday = Boolean(visibility.showBirthday)
|
||||
}
|
||||
|
||||
// Handle password change
|
||||
|
||||
Reference in New Issue
Block a user