mirror of https://github.com/portainer/portainer
20 lines
389 B
TypeScript
20 lines
389 B
TypeScript
import { CreateContainerRequest } from '../types';
|
|
|
|
import { RestartPolicy } from './types';
|
|
|
|
export function toRequest(
|
|
config: CreateContainerRequest,
|
|
value: RestartPolicy
|
|
): CreateContainerRequest {
|
|
return {
|
|
...config,
|
|
HostConfig: {
|
|
...config.HostConfig,
|
|
RestartPolicy: {
|
|
...config.HostConfig.RestartPolicy,
|
|
Name: value,
|
|
},
|
|
},
|
|
};
|
|
}
|