no message
This commit is contained in:
parent
6ed7265094
commit
8339e6ce6d
4 changed files with 32 additions and 25 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue