Files
portainer/app/react/docker/proxy/queries/usePing.ts
T
2025-12-17 13:02:19 +02:00

13 lines
399 B
TypeScript

import axios, { parseAxiosError } from '@CE/portainer/services/axios';
import { EnvironmentId } from '@CE/react/portainer/environments/types';
import { buildDockerProxyUrl } from './buildDockerProxyUrl';
export async function ping(environmentId: EnvironmentId) {
try {
await axios.get(buildDockerProxyUrl(environmentId, '_ping'));
} catch (error) {
throw parseAxiosError(error);
}
}