This commit is contained in:
@@ -31,7 +31,7 @@ export const getServices = () => api.get('/services/');
|
||||
export const getServiceDetail = (id) => api.get(`/services/${id}/`);
|
||||
export const createServiceOrder = (data) => api.post('/service-orders/', data);
|
||||
export const getVCCourses = () => api.get('/courses/');
|
||||
export const getVCCourseDetail = (id) => api.get(`/courses/${id}/`);
|
||||
export const getVCCourseDetail = (id) => api.get(`/courses/${id}/`, { params: { _t: Date.now() } });
|
||||
export const enrollCourse = (data) => api.post('/course-enrollments/', data);
|
||||
|
||||
export const sendSms = (data) => api.post('/auth/send-sms/', data);
|
||||
|
||||
@@ -68,6 +68,7 @@ const VCCourseDetail = () => {
|
||||
const fetchDetail = async () => {
|
||||
try {
|
||||
const response = await getVCCourseDetail(id);
|
||||
console.log('Course detail:', response.data);
|
||||
setCourse(response.data);
|
||||
} catch (error) {
|
||||
console.error("Failed to fetch course detail:", error);
|
||||
|
||||
Reference in New Issue
Block a user