mirror of
https://github.com/portainer/portainer.git
synced 2025-07-18 21:09:40 +02:00
19 lines
373 B
TypeScript
19 lines
373 B
TypeScript
import { RegistryId } from '../types/registry';
|
|
|
|
export function buildUrl(registryId: RegistryId, resource?: 'repositories') {
|
|
let url = '/registries';
|
|
|
|
if (registryId) {
|
|
url += `/${registryId}`;
|
|
}
|
|
|
|
if (resource) {
|
|
url += `/${resource}`;
|
|
}
|
|
|
|
return url;
|
|
}
|
|
|
|
export function buildProxyUrl(registryId: RegistryId) {
|
|
return `${buildUrl(registryId)}/v2`;
|
|
}
|