UI cleanup for add allocation button

This commit is contained in:
Dane Everitt 2020-10-31 14:10:53 -07:00
parent abb043c1cc
commit db7e4e749f
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
2 changed files with 37 additions and 49 deletions

View file

@ -0,0 +1,11 @@
import { Allocation } from '@/api/server/getServer';
import http from '@/api/http';
import { rawDataToServerAllocation } from '@/api/transformers';
export default (uuid: string): Promise<Allocation> => {
return new Promise((resolve, reject) => {
http.get(`/api/client/servers/${uuid}/network/allocations/new`)
.then(({ data }) => resolve(rawDataToServerAllocation(data)))
.catch(reject);
});
};