components: Move image creation to PF4 wizard

This commit is contained in:
sanne raymaekers 2020-05-07 12:43:51 +02:00 committed by Sanne Raymaekers
parent 3e797b92b0
commit 001e53a733
8 changed files with 532 additions and 57 deletions

23
src/api.js Normal file
View file

@ -0,0 +1,23 @@
import axios from 'axios';
import {
OSBUILD_INSTALLER_API,
} from './constants';
const postHeaders = { headers: { 'Content-Type': 'application/json' }};
async function composeImage(body) {
let path = '/compose';
const request = await axios.post(OSBUILD_INSTALLER_API.concat(path), body, postHeaders);
return request.data;
}
async function getComposeStatus(id) {
let path = '/compose/' + id;
const request = await axios.get(OSBUILD_INSTALLER_API.concat(path));
return request.data;
}
export default {
composeImage,
getComposeStatus,
};