fix/feat: Now the projectId is correctly fetched yet we cant test shit since the db is empty
This commit is contained in:
@@ -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,
|
||||
|
Reference in New Issue
Block a user