mirror of https://github.com/portainer/portainer
16 lines
297 B
TypeScript
16 lines
297 B
TypeScript
|
import { EnvironmentId } from '@/react/portainer/environments/types';
|
||
|
|
||
|
export function buildUrl(
|
||
|
environmentId: EnvironmentId,
|
||
|
action: string,
|
||
|
subAction = ''
|
||
|
) {
|
||
|
let url = `/endpoints/${environmentId}/docker/${action}`;
|
||
|
|
||
|
if (subAction) {
|
||
|
url += `/${subAction}`;
|
||
|
}
|
||
|
|
||
|
return url;
|
||
|
}
|