แก้apiยิงไปข้างนอก

This commit is contained in:
Kittapath 2024-04-18 15:57:03 +07:00
parent afc42b743e
commit 109bea3fc8
2 changed files with 8 additions and 8 deletions

View file

@ -21,7 +21,7 @@ class CallAPI {
try { try {
const response = await axios.get(url, { const response = await axios.get(url, {
headers: { headers: {
Authorization: `Bearer ${token}`, Authorization: `${token}`,
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
}); });
@ -37,7 +37,7 @@ class CallAPI {
try { try {
const response = await axios.post(url, sendData, { const response = await axios.post(url, sendData, {
headers: { headers: {
Authorization: `Bearer ${token}`, Authorization: `${token}`,
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
}); });