1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-23 07:19:41 +02:00
portainer/app/react/docker/containers/CreateView/EnvVarsTab/toRequest.ts

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

15 lines
423 B
TypeScript
Raw Permalink Normal View History

import { convertToArrayOfStrings } from '@@/form-components/EnvironmentVariablesFieldset/utils';
import { EnvVarValues } from '@@/form-components/EnvironmentVariablesFieldset';
import { CreateContainerRequest } from '../types';
export function toRequest(
oldConfig: CreateContainerRequest,
values: EnvVarValues
): CreateContainerRequest {
return {
...oldConfig,
Env: convertToArrayOfStrings(values),
};
}