fix(dimentorin): unwrap paginated response + local dev API URL

This commit is contained in:
asepharyana
2026-08-04 18:15:57 +07:00
parent 7df4592a47
commit ce0579de5d
+7 -7
View File
@@ -17,7 +17,7 @@ export const getMentors = async (
url: '/dimentorin/mentors/public',
params,
});
return data;
return data.data;
};
export const getMentorDetail = async (id: string): Promise<TMentorDetail> => {
@@ -25,7 +25,7 @@ export const getMentorDetail = async (id: string): Promise<TMentorDetail> => {
method: 'GET',
url: `/dimentorin/mentors/public/${id}`,
});
return data;
return data.data;
};
export const getMentorMe = async (): Promise<TMentorDetail> => {
@@ -33,7 +33,7 @@ export const getMentorMe = async (): Promise<TMentorDetail> => {
method: 'GET',
url: '/dimentorin/mentors/me',
});
return data;
return data.data;
};
export const getMentorMeStatus = async (): Promise<{ status: string }> => {
@@ -41,7 +41,7 @@ export const getMentorMeStatus = async (): Promise<{ status: string }> => {
method: 'GET',
url: '/dimentorin/mentors/me/status',
});
return data;
return data.data;
};
export const getMentorAvailability = async (
@@ -51,7 +51,7 @@ export const getMentorAvailability = async (
method: 'GET',
url: `/dimentorin/mentors/${id}/availability`,
});
return data;
return data.data;
};
export const getMentorSessions = async (
@@ -61,7 +61,7 @@ export const getMentorSessions = async (
method: 'GET',
url: `/dimentorin/mentors/${id}/sessions`,
});
return data;
return data.data;
};
export const getMySessions = async (): Promise<TSessionListResponse> => {
@@ -69,7 +69,7 @@ export const getMySessions = async (): Promise<TSessionListResponse> => {
method: 'GET',
url: '/dimentorin/sessions/me',
});
return data;
return data.data;
};
export const postBookSession = async (