mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-17 13:05:32 +09:00
refactor: simplify account standing and verification levels (#3130)
This commit is contained in:
1 parent
1abde06824
commit
1ec8f31253
488 files changed
+10390
-47117
No files matched your search
@@ -286,7 +286,6 @@ export interface MasterConfig {
|
||||
};
|
||||
instance: {
|
||||
self_hosted: boolean;
|
||||
phone_verification_enabled?: boolean;
|
||||
auto_join_invite_code?: string;
|
||||
visionaries_guild_id?: string;
|
||||
visionaries_guild_visionary_role_id?: string;
|
||||
|
||||
@@ -290,15 +290,6 @@ describe('buildNamedFluxerEnvOverrides', () => {
|
||||
});
|
||||
});
|
||||
|
||||
test('maps the phone verification switch onto instance.phone_verification_enabled', () => {
|
||||
expect(buildNamedFluxerEnvOverrides({FLUXER_PHONE_VERIFICATION_ENABLED: 'true'})).toEqual({
|
||||
instance: {phone_verification_enabled: true},
|
||||
});
|
||||
expect(buildNamedFluxerEnvOverrides({FLUXER_PHONE_VERIFICATION_ENABLED: 'false'})).toEqual({
|
||||
instance: {phone_verification_enabled: false},
|
||||
});
|
||||
});
|
||||
|
||||
test('rejects a store enabled flag that is not a boolean', () => {
|
||||
expect(() => buildNamedFluxerEnvOverrides({FLUXER_APP_STORE_ENABLED: 'yes'})).toThrow(
|
||||
'FLUXER_APP_STORE_ENABLED must be true or false',
|
||||
|
||||
@@ -265,7 +265,6 @@ const NAMED_FLUXER_ENV_OVERRIDES: Record<string, NamedEnvOverride> = {
|
||||
parse: parseBoolean,
|
||||
},
|
||||
FLUXER_SELF_HOSTED: {path: ['instance', 'self_hosted'], parse: parseBoolean},
|
||||
FLUXER_PHONE_VERIFICATION_ENABLED: {path: ['instance', 'phone_verification_enabled'], parse: parseBoolean},
|
||||
FLUXER_AUTO_JOIN_INVITE_CODE: {path: ['instance', 'auto_join_invite_code']},
|
||||
FLUXER_VISIONARIES_GUILD_ID: {path: ['instance', 'visionaries_guild_id']},
|
||||
FLUXER_VISIONARIES_GUILD_VISIONARY_ROLE_ID: {path: ['instance', 'visionaries_guild_visionary_role_id']},
|
||||
|
||||
Reference in new issue
Block a user