🐛 fix(__main__.py): fix typo in sendAll function URL

✨ feat(__main__.py): add banner with title and info text to be displayed on server start
🐛 fix(App.tsx): fix API endpoint URL
The sendAll function URL had an extra forward slash. The API endpoint URL in App.tsx was incorrect and has been fixed. A banner with a title and info text has been added to be displayed on server start to provide users with more information about the application.
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-06-06 23:29:42 -03:00
commit 72afbb834c
3 changed files with 73 additions and 16 deletions

View file

@ -49,7 +49,7 @@ export default function App() {
// Initialize state variable for the version
const [version, setVersion] = useState("");
useEffect(() => {
fetch("/version")
fetch("api/v1/version")
.then((res) => res.json())
.then((data) => {
setVersion(data.version);

View file

@ -4,11 +4,11 @@ import axios, { AxiosResponse } from "axios";
import { FlowType } from "../../types/flow";
export async function getAll(): Promise<AxiosResponse<APIObjectType>> {
return await axios.get(`/all`);
return await axios.get(`api/v1/all`);
}
export async function sendAll(data: sendAllProps) {
return await axios.post(`/predict`, data);
return await axios.post(`api/v1//predict`, data);
}
export async function checkCode(