mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-12 00:15:48 +01:00
🐛 Fix StatusCode not being used properly
This commit is contained in:
@@ -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) => {
|
||||
</motion.div>
|
||||
);
|
||||
};
|
||||
|
||||
type PingState = 'loading' | 'down' | 'online';
|
||||
|
||||
@@ -23,7 +23,7 @@ interface AppBehaviourType {
|
||||
|
||||
interface AppNetworkType {
|
||||
enabledStatusChecker: boolean;
|
||||
okStatus: number[];
|
||||
statusCodes: string[];
|
||||
}
|
||||
|
||||
interface AppAppearanceType {
|
||||
|
||||
Reference in New Issue
Block a user