import { Config } from 'docker-types/generated/1.44'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { EnvironmentId } from '@/react/portainer/environments/types'; import { PortainerResponse } from '../../types'; import { buildUrl } from './build-url'; export async function getConfig( environmentId: EnvironmentId, configId: Config['ID'] ) { try { const { data } = await axios.get>( buildUrl(environmentId, configId) ); return data; } catch (e) { throw parseAxiosError(e, 'Unable to retrieve config'); } }