diff --git a/src/components/Dashboard/Tiles/Apps/AppPing.tsx b/src/components/Dashboard/Tiles/Apps/AppPing.tsx index d94cdc676..0a14bb9f2 100644 --- a/src/components/Dashboard/Tiles/Apps/AppPing.tsx +++ b/src/components/Dashboard/Tiles/Apps/AppPing.tsx @@ -19,7 +19,7 @@ export const AppPing = ({ app }: AppPingProps) => { queryKey: ['ping', { id: app.id, name: app.name }], queryFn: async () => { const response = await fetch(`/api/modules/ping?url=${encodeURI(app.url)}`); - const isOk = app.network.okStatus.includes(response.status); + const isOk = app.network.statusCodes.includes(response.status.toString()); return { status: response.status, state: isOk ? 'online' : 'down', @@ -60,5 +60,3 @@ export const AppPing = ({ app }: AppPingProps) => { ); }; - -type PingState = 'loading' | 'down' | 'online'; diff --git a/src/types/app.ts b/src/types/app.ts index 2e611c031..ca933d2d4 100644 --- a/src/types/app.ts +++ b/src/types/app.ts @@ -23,7 +23,7 @@ interface AppBehaviourType { interface AppNetworkType { enabledStatusChecker: boolean; - okStatus: number[]; + statusCodes: string[]; } interface AppAppearanceType {