mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-24 08:51:16 -05:00
Fix settings validation and session errors
This commit is contained in:
@@ -18,17 +18,18 @@ import { z } from 'zod';
|
||||
|
||||
/**
|
||||
* Schema for privacy settings in user_preferences
|
||||
* Uses defaults for backward compatibility with incomplete data
|
||||
*/
|
||||
export const privacySettingsSchema = z.object({
|
||||
activity_visibility: z.enum(['public', 'private'] as const),
|
||||
search_visibility: z.boolean(),
|
||||
show_location: z.boolean(),
|
||||
show_age: z.boolean(),
|
||||
show_avatar: z.boolean(),
|
||||
show_bio: z.boolean(),
|
||||
show_activity_stats: z.boolean(),
|
||||
show_home_park: z.boolean()
|
||||
});
|
||||
activity_visibility: z.enum(['public', 'private'] as const).default('public'),
|
||||
search_visibility: z.boolean().default(true),
|
||||
show_location: z.boolean().default(false),
|
||||
show_age: z.boolean().default(false),
|
||||
show_avatar: z.boolean().default(true),
|
||||
show_bio: z.boolean().default(true),
|
||||
show_activity_stats: z.boolean().default(true),
|
||||
show_home_park: z.boolean().default(false)
|
||||
}).passthrough();
|
||||
|
||||
/**
|
||||
* Schema for profile privacy settings
|
||||
|
||||
Reference in New Issue
Block a user