complete progress section

This commit is contained in:
HAM!DREZA
2024-07-01 23:09:43 +03:30
parent 87e16dc016
commit a8e723ddf0
28 changed files with 333 additions and 103 deletions
+3 -3
View File
@@ -2,7 +2,7 @@ export default defineEventHandler(async (event) => {
const { public: { apiBase } } = useRuntimeConfig();
const token = getCookie(event, 'token');
const body = await readBody(event);
console.log(body);
try {
const data = await $fetch(`${apiBase}/user/registerCourse`, {
method: 'POST',
@@ -12,10 +12,10 @@ export default defineEventHandler(async (event) => {
},
body
});
console.log(data);
return data;
} catch (error) {
console.log('errors',error.data);
if (error.status === 406) {
return{
status: 406,