mirror of
https://github.com/frappe/lms.git
synced 2026-04-19 22:52:29 +03:00
fix: removed body content from course export request
This commit is contained in:
@@ -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')
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user