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
+20
View File
@@ -0,0 +1,20 @@
export default defineEventHandler(async (event) => {
const { public: { apiBase } } = useRuntimeConfig();
const token = getCookie(event, 'token');
const query = getQuery(event);
try {
const data = await $fetch(`${apiBase}/uploader/file?fileName=${query.fileName}`, {
method: 'GET',
headers: {
'Accept': 'application/json',
'Authorization': `Bearer ${token}`
}
});
return data;
} catch (error) {
return error;
}
});