mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-17 21:15:32 +09:00
feat(profile): move profile timezone from staff to an experiment (#3011)
This commit is contained in:
1 parent
dd8ed6f205
commit
564c5ae164
67 files changed
+843
-554
No files matched your search
@@ -5,6 +5,10 @@ import {
|
||||
DomainMigrationAssignmentResponse,
|
||||
INERT_DOMAIN_MIGRATION_ASSIGNMENT,
|
||||
} from '@fluxer/schema/src/domains/admin/DomainMigrationSchemas';
|
||||
import {
|
||||
INERT_PROFILE_TIMEZONE_ASSIGNMENT,
|
||||
ProfileTimezoneAssignmentResponse,
|
||||
} from '@fluxer/schema/src/domains/admin/ProfileTimezoneSchemas';
|
||||
import {
|
||||
INERT_VOICE_NOISE_SUPPRESSION_ASSIGNMENT,
|
||||
VoiceNoiseSuppressionAssignmentResponse,
|
||||
@@ -49,6 +53,7 @@ const ExperimentAssignmentsSchema = z.object({
|
||||
voice_noise_suppression: VoiceNoiseSuppressionAssignmentResponse.optional(),
|
||||
domain_migration: DomainMigrationAssignmentResponse.optional(),
|
||||
altcha_captcha: AltchaCaptchaAssignmentResponse.optional(),
|
||||
profile_timezone: ProfileTimezoneAssignmentResponse.optional(),
|
||||
});
|
||||
|
||||
export const ExperimentAssignmentsResponse = z.object({
|
||||
@@ -76,3 +81,9 @@ export function readDomainMigrationAssignment(
|
||||
): DomainMigrationAssignmentResponse {
|
||||
return response.assignments.domain_migration ?? INERT_DOMAIN_MIGRATION_ASSIGNMENT;
|
||||
}
|
||||
|
||||
export function readProfileTimezoneAssignment(
|
||||
response: ExperimentAssignmentsResponse,
|
||||
): ProfileTimezoneAssignmentResponse {
|
||||
return response.assignments.profile_timezone ?? INERT_PROFILE_TIMEZONE_ASSIGNMENT;
|
||||
}
|
||||
Reference in new issue
Block a user