no message

This commit is contained in:
Kittapath 2024-02-28 14:46:17 +07:00
parent 6ed7265094
commit 8339e6ce6d
4 changed files with 32 additions and 25 deletions

View file

@ -35,17 +35,12 @@ class CallAPI {
const token = request.headers.authorization;
const url = process.env.API + path;
try {
console.log("response");
console.log(url);
console.log("response");
const response = await axios.post(url, {
const response = await axios.post(url, sendData, {
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json",
},
json: sendData,
});
console.log(response);
return response.data.result;
} catch (error) {
throw error;