mirror of https://github.com/portainer/portainer
16 lines
476 B
TypeScript
16 lines
476 B
TypeScript
import axios, { parseAxiosError } from '@/portainer/services/axios';
|
|
import { EnvironmentId } from '@/react/portainer/environments/types';
|
|
|
|
import { buildDockerProxyUrl } from '../buildDockerProxyUrl';
|
|
|
|
export async function getSecrets(environmentId: EnvironmentId) {
|
|
try {
|
|
const { data } = await axios.get(
|
|
buildDockerProxyUrl(environmentId, 'secrets')
|
|
);
|
|
return data;
|
|
} catch (err) {
|
|
throw parseAxiosError(err, 'Unable to retrieve secrets');
|
|
}
|
|
}
|