Support modifying the primary allocation for a server

This commit is contained in:
Dane Everitt
2020-07-09 19:56:46 -07:00
parent bfb28f949d
commit fc9054312d
17 changed files with 230 additions and 87 deletions

View File

@@ -0,0 +1,9 @@
import { Allocation } from '@/api/server/getServer';
import http from '@/api/http';
import { rawDataToServerAllocation } from '@/api/transformers';
export default async (uuid: string, ip: string, port: number): Promise<Allocation> => {
const { data } = await http.put(`/api/client/servers/${uuid}/network/primary`, { ip, port });
return rawDataToServerAllocation(data);
};