1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-25 16:29:44 +02:00
portainer/app/react/docker/volumes/queries/build-url.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
427 B
TypeScript
Raw Normal View History

import { buildUrl as buildProxyUrl } from '@/react/docker/proxy/queries/build-url';
import { EnvironmentId } from '@/react/portainer/environments/types';
export function buildUrl(
environmentId: EnvironmentId,
{ action, id }: { id?: string; action?: string } = {}
) {
let url = buildProxyUrl(environmentId, 'volumes');
if (id) {
url += `/${id}`;
}
if (action) {
url += `/${action}`;
}
return url;
}