update
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
export default defineEventHandler(async (event) => {
|
||||
const { public: { apiBase } } = useRuntimeConfig();
|
||||
const body = await readBody(event);
|
||||
console.log(body);
|
||||
|
||||
try {
|
||||
const data = await $fetch(`${apiBase}/course${body.changeCategory}`, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Accept': 'application/json',
|
||||
}
|
||||
});
|
||||
return data;
|
||||
} catch (error) {
|
||||
return error;
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
// const page = ref(0);
|
||||
|
||||
// const { data, refresh } = await useFetch(() => '/api/global', {
|
||||
// query: { url: '/orders', page },
|
||||
// headers: useRequestHeaders(['cookie'])
|
||||
// })
|
||||
|
||||
// function paginate(value) {
|
||||
// page.value = value;
|
||||
// refresh()
|
||||
// }
|
||||
Reference in New Issue
Block a user