This commit is contained in:
HAM!DREZA
2024-06-17 09:09:00 +03:30
parent 2886e999f1
commit 3f9e0d7615
11 changed files with 666 additions and 234 deletions
+19
View File
@@ -0,0 +1,19 @@
export default defineEventHandler(async (event) => {
const { public: { apiBase } } = useRuntimeConfig();
const token = getCookie(event, 'token');
try {
const payments = await $fetch(`${apiBase}/user/payments`, {
method: 'GET',
headers: {
'Accept': 'application/json',
'Authorization': `Bearer ${token}`
},
});
console.log('server', payments);
return payments;
} catch (error) {
return error;
}
})