2020-07-10 02:56:46 +00:00
|
|
|
import { Allocation } from '@/api/server/getServer';
|
|
|
|
import { FractalResponseData } from '@/api/http';
|
|
|
|
|
|
|
|
export const rawDataToServerAllocation = (data: FractalResponseData): Allocation => ({
|
2020-07-10 03:36:08 +00:00
|
|
|
id: data.attributes.id,
|
2020-07-10 02:56:46 +00:00
|
|
|
ip: data.attributes.ip,
|
|
|
|
alias: data.attributes.ip_alias,
|
|
|
|
port: data.attributes.port,
|
2020-07-10 03:36:08 +00:00
|
|
|
notes: data.attributes.notes,
|
2020-07-10 02:56:46 +00:00
|
|
|
isDefault: data.attributes.is_default,
|
|
|
|
});
|