diff --git a/src/apps/Settings/SettingsNotifications/SettingsNotifications.tsx b/src/apps/Settings/SettingsNotifications/SettingsNotifications.tsx index 1b658031..cd4898a6 100644 --- a/src/apps/Settings/SettingsNotifications/SettingsNotifications.tsx +++ b/src/apps/Settings/SettingsNotifications/SettingsNotifications.tsx @@ -27,7 +27,7 @@ export default function SettingsNotifications() { }); useEffect(() => { - setWebhook(settings?.notifications?.webhook); + setWebhook(settings?.webhook); }, [settings]); const onWebhookChange = (e: any) => { @@ -38,7 +38,7 @@ export default function SettingsNotifications() { const onSave = () => { setSaving(true); api.settings - .patch({ notifications: { webhook } }) + .patch({ webhook }) .then(() => setChanged(false)) .catch(console.error) .finally(() => setSaving(false)); diff --git a/src/apps/Settings/SettingsUpdates/SettingsUpdates.tsx b/src/apps/Settings/SettingsUpdates/SettingsUpdates.tsx index 9dd312ee..b0c52e4a 100644 --- a/src/apps/Settings/SettingsUpdates/SettingsUpdates.tsx +++ b/src/apps/Settings/SettingsUpdates/SettingsUpdates.tsx @@ -82,7 +82,7 @@ export default function SettingsUpdates() { Enable Beta channel setChannel(beta)} disabled={isLoading} /> diff --git a/src/apps/Settings/hooks/useSettingsMutation.tsx b/src/apps/Settings/hooks/useSettingsMutation.tsx index 886cd123..77c440b7 100644 --- a/src/apps/Settings/hooks/useSettingsMutation.tsx +++ b/src/apps/Settings/hooks/useSettingsMutation.tsx @@ -8,9 +8,7 @@ export const useSettingsChannelMutation = ( mutationKey: ["settings"], mutationFn: (beta?: boolean) => api.settings.patch({ - updates: { - channel: beta ? "beta" : "stable", - }, + updates_channel: beta ? "beta" : "stable", }), ...options, }); diff --git a/src/models/settings.ts b/src/models/settings.ts index 3eba66f8..1686e8e1 100644 --- a/src/models/settings.ts +++ b/src/models/settings.ts @@ -1,9 +1,4 @@ type Settings = { - notifications?: { - webhook?: string; - }; - - updates?: { - channel?: string; - }; + webhook?: string; + updates_channel?: string; };