1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-25 00:09:40 +02:00
portainer/app/react/edge/edge-groups/queries/build-url.ts

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

11 lines
264 B
TypeScript
Raw Normal View History

import { EdgeGroup } from '../types';
export function buildUrl({
action,
id,
}: { id?: EdgeGroup['Id']; action?: string } = {}) {
const baseUrl = '/edge_groups';
const url = id ? `${baseUrl}/${id}` : baseUrl;
return action ? `${url}/${action}` : url;
}