You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
648 B
JavaScript

import { logger } from "./log.js";
import request from "./request.js";
function checkScene(scene) {
const req = new Request(`${request}/checkscene?scene=${scene}`);
let init = {
method: "GET",
//body: JSON.stringify({"points": data})
};
// we defined the xhr
return fetch(req, init)
.then((response) => {
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
} else {
return response.json();
}
})
.then((ret) => {
logger.setErrorsContent(ret);
})
.catch((reject) => {
console.log("error check scene!");
});
}
export { checkScene };