From bb95c7009faaf22103c1c8e84e3403823377ce0f Mon Sep 17 00:00:00 2001 From: fallenbagel <98979876+fallenbagel@users.noreply.github.com> Date: Sat, 14 Jun 2025 01:14:12 +0500 Subject: [PATCH] fix: correct typing issue (#1715) * fix(ntfy): display the current value of auth and fix types When using the username/password as auth method, the saved value was not displayed properly because of a wrong property name introduced by a missing type. * fix: correct typing issue --------- Co-authored-by: gauthier-th --- .../Notifications/NotificationsNtfy/index.tsx | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/components/Settings/Notifications/NotificationsNtfy/index.tsx b/src/components/Settings/Notifications/NotificationsNtfy/index.tsx index 3ffdd55c0..85fa943b9 100644 --- a/src/components/Settings/Notifications/NotificationsNtfy/index.tsx +++ b/src/components/Settings/Notifications/NotificationsNtfy/index.tsx @@ -6,6 +6,7 @@ import globalMessages from '@app/i18n/globalMessages'; import defineMessages from '@app/utils/defineMessages'; import { isValidURL } from '@app/utils/urlValidationHelper'; import { ArrowDownOnSquareIcon, BeakerIcon } from '@heroicons/react/24/outline'; +import type { NotificationAgentNtfy } from '@server/lib/settings'; import axios from 'axios'; import { Field, Form, Formik } from 'formik'; import { useState } from 'react'; @@ -44,7 +45,7 @@ const NotificationsNtfy = () => { data, error, mutate: revalidate, - } = useSWR('/api/v1/settings/notifications/ntfy'); + } = useSWR('/api/v1/settings/notifications/ntfy'); const NotificationsNtfySchema = Yup.object().shape({ url: Yup.string() @@ -78,15 +79,15 @@ const NotificationsNtfy = () => { return ( { @@ -302,7 +303,7 @@ const NotificationsNtfy = () => { )} { setFieldValue('types', newTypes); setFieldTouched('types');