fix error if update is failed

This commit is contained in:
Jonny_Bro (Nikita) 2024-04-02 07:39:47 +05:00
parent 9fdfbecc7a
commit 9a030fc231
No known key found for this signature in database
GPG key ID: 3F1ECC04147E9BD8

View file

@ -62,8 +62,8 @@ function GetCourse(sharecode)
return false return false
end end
end, function(message) end, function(e)
print("An error occurred: " .. message) print("An error occurred: " .. e)
return false return false
end, { end, {
@ -96,8 +96,8 @@ function UploadCourse()
return false return false
end end
end, function(message) end, function(e)
print("Unexpected error: " .. message) print("Unexpected error: " .. e)
end, { end, {
authorization = apikey:GetString(), authorization = apikey:GetString(),
course = util.Base64Encode(filedata, true), course = util.Base64Encode(filedata, true),
@ -128,12 +128,12 @@ function UpdateCourse(course_code)
return true return true
else else
print("An error occurred: " .. message) print("An error occurred: " .. response.message)
return false return false
end end
end, function(message) end, function(e)
print("Unexpected error: " .. message) print("Unexpected error: " .. e)
end, { end, {
authorization = apikey:GetString(), authorization = apikey:GetString(),
code = course_code, code = course_code,