From bf86bf6fe37d08538163c24acabf3c1fed421ba6 Mon Sep 17 00:00:00 2001 From: tomvanmele Date: Wed, 31 Jan 2024 22:55:14 +0100 Subject: [PATCH] api functions --- src/api/compas.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/api/compas.js b/src/api/compas.js index 298dad5..0634dc5 100644 --- a/src/api/compas.js +++ b/src/api/compas.js @@ -1,10 +1,19 @@ import axios from "axios"; -const HOST = "http://127.0.0.1:8000/"; +const HOST = "http://localhost:8000"; export default { - async fetchKeywords() { - let response = await axios.get(HOST + "api/brg/meta/keyword/"); + async ping() { + let response = await axios.get(HOST + "/ping"); + return response.data; + }, + + async boxToSubdividedMesh(boxdata) { + let response = await axios.post(HOST + "/box_to_subdivided_mesh", { + xsize: boxdata.xsize, + ysize: boxdata.ysize, + zsize: boxdata.zsize, + }); return response.data; }, };