fix: removed body content from course export request

This commit is contained in:
Jannat Patel
2026-04-09 20:29:00 +05:30
parent 0f7a2d1975
commit 75ed9c5ec2

View File

@@ -156,20 +156,17 @@ const isAdmin = computed(() => {
const exportCourse = async () => {
try {
const response = await fetch(
'/api/method/lms.lms.api.export_course_as_zip',
'/api/method/lms.lms.api.export_course_as_zip?course_name=' +
course.data.name,
{
method: 'GET',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
course_name: course.data.name,
}),
credentials: 'include',
}
)
if (!response.ok) {
const errorText = await response.text()
console.error('Error response:', errorText)
throw new Error('Download failed')
}