Use new API route (fix #10)

This commit is contained in:
Daniel Kluge 2022-01-16 15:16:24 +01:00
parent 3efbcae886
commit 74adb7c19f

View File

@ -23,7 +23,7 @@ const ProjectModal: NextPage<ModalInput> = ({ project, visible, setVisible }) =>
if (project && project !== "") { if (project && project !== "") {
// TODO // TODO
// set Spinner // set Spinner
fetch(`/api/get_project?projectName=${project}`).then((res) => { fetch(`/api/projects/${project}`).then((res) => {
if (res.status === 404) setProjectData(projectNotFoundHtml); if (res.status === 404) setProjectData(projectNotFoundHtml);
if (res.status !== 200) setProjectData(projectServerErrorHtml); if (res.status !== 200) setProjectData(projectServerErrorHtml);
res.text().then(data => { res.text().then(data => {