You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
portainer/app/react/docker/images/queries/encodeRegistryCredentials.ts

15 lines
331 B

import { Registry } from '@/react/portainer/registries/types/registry';
/**
* Encodes the registry credentials in base64
* @param registryId
* @returns
*/
export function encodeRegistryCredentials(registryId: Registry['Id']) {
const credentials = {
registryId,
};
return window.btoa(JSON.stringify(credentials));
}