2020-09-28 15:50:34 +00:00
|
|
|
import { Allocation } from '@/api/server/getServer';
|
|
|
|
import http from '@/api/http';
|
|
|
|
import { rawDataToServerAllocation } from '@/api/transformers';
|
|
|
|
|
2020-10-31 21:58:15 +00:00
|
|
|
export default async (uuid: string): Promise<Allocation> => {
|
|
|
|
const { data } = await http.post(`/api/client/servers/${uuid}/network/allocations`);
|
|
|
|
|
|
|
|
return rawDataToServerAllocation(data);
|
2020-09-28 15:50:34 +00:00
|
|
|
};
|