fix/feat: Now the projectId is correctly fetched yet we cant test shit since the db is empty
Some checks failed
Format / formatting (push) Successful in 6s
Build / build (push) Successful in 41s
CI / build (push) Failing after 12s
Format / formatting (pull_request) Successful in 6s

This commit is contained in:
2025-04-29 23:18:26 +02:00
parent 5130c00796
commit 92696c3e16
4 changed files with 81 additions and 13 deletions

View File

@@ -8,6 +8,28 @@ import {
} from "@/services/api";
// Entrepreneurs API
function getEntrepreneurProjectId(
onSuccessHandler?: (response: AxiosResponse<number[]>) => void,
onErrorHandler?: (error: AxiosError) => void
): void {
axiosInstance
.get("/entrepreneur/projects")
.then((response) => {
if (onSuccessHandler) {
onSuccessHandler(response);
} else {
defaultApiSuccessHandler(response);
}
})
.catch((error: AxiosError) => {
if (onErrorHandler) {
onErrorHandler(error);
} else {
defaultApiErrorHandler(error);
}
});
}
function requestProjectCreation(
projectDetails: Project,
onSuccessHandler?: (response: AxiosResponse) => void,
@@ -102,6 +124,7 @@ function removeSectionCell(
}
export {
getEntrepreneurProjectId,
requestProjectCreation,
addSectionCell,
modifySectionCell,