update
This commit is contained in:
@@ -3,7 +3,7 @@ export default defineEventHandler(async (event) => {
|
||||
const { public: { apiBase } } = useRuntimeConfig();
|
||||
const token = getCookie(event, 'token');
|
||||
const body = await readBody(event);
|
||||
console.log('body', body.id);
|
||||
console.log('badane :', body);
|
||||
try {
|
||||
const data = await $fetch(`${apiBase}/ticket/${body.id}`, {
|
||||
method: 'GET',
|
||||
@@ -13,7 +13,6 @@ console.log('body', body.id);
|
||||
},
|
||||
id: body.id
|
||||
});
|
||||
console.log('tttt :', data);
|
||||
return data;
|
||||
} catch (error) {
|
||||
return error;
|
||||
|
||||
@@ -3,7 +3,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}/ticket`, {
|
||||
method: 'POST',
|
||||
@@ -11,8 +11,9 @@ export default defineEventHandler(async (event) => {
|
||||
'Accept': 'application/json',
|
||||
'Authorization': `Bearer ${token}`
|
||||
},
|
||||
body
|
||||
body,
|
||||
});
|
||||
|
||||
return data;
|
||||
} catch (error) {
|
||||
|
||||
@@ -3,7 +3,6 @@ export default defineEventHandler(async (event) => {
|
||||
const { public: { apiBase } } = useRuntimeConfig();
|
||||
const token = getCookie(event, 'token');
|
||||
const body = await readBody(event);
|
||||
console.log('bod' , body);
|
||||
try {
|
||||
const data = await $fetch(`${apiBase}/ticket/message`, {
|
||||
method: 'POST',
|
||||
@@ -13,7 +12,6 @@ console.log('bod' , body);
|
||||
},
|
||||
body
|
||||
});
|
||||
console.log('new :', data);
|
||||
return data;
|
||||
} catch (error) {
|
||||
// if (error.statusCode == 401) {
|
||||
|
||||
Reference in New Issue
Block a user