import axios from "axios";

const sendToDatabase = (data: any) => {
    axios.post("http://localhost:5000/interstellar_ai/db", data)
        .then(response => {
            const status = response.data.status
            console.log(status);
            postMessage({ status })
            console.log('message posted');

        })
        .catch(error => {
            console.log("Error calling Database:", error)
            postMessage({ status: 500 })
        })
}