Refactor: Simplify CAPTCHA bypass logic

This commit is contained in:
gpt-engineer-app[bot]
2025-10-11 00:47:34 +00:00
parent 21acbb948c
commit 3f08dcb203
4 changed files with 10 additions and 76 deletions

View File

@@ -78,11 +78,6 @@ export function useAdminSettings() {
return settings?.filter(s => s.category === category) || [];
};
const getCaptchaBypassEnabled = (): boolean => {
const value = getSettingValue('auth.captcha_bypass_enabled', 'false');
const cleanValue = typeof value === 'string' ? value.replace(/"/g, '') : value;
return cleanValue === 'true' || cleanValue === true;
};
const updateSetting = async (key: string, value: any) => {
return updateSettingMutation.mutateAsync({ key, value });
@@ -185,6 +180,5 @@ export function useAdminSettings() {
getAutoRefreshStrategy,
getPreserveInteractionState,
getUseRealtimeQueue,
getCaptchaBypassEnabled,
};
}