portainer/app/docker/services/ping.ts

11 lines
341 B
TypeScript

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