fix 401 hit api
This commit is contained in:
@@ -92,10 +92,11 @@ class DataSettings {
|
|||||||
server: {
|
server: {
|
||||||
url: `${GlobalConfig.apiHost}/api/data-settings`,
|
url: `${GlobalConfig.apiHost}/api/data-settings`,
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: `Bearer ${document
|
"X-CSRF-TOKEN": document
|
||||||
.querySelector('meta[name="api-token"]')
|
.querySelector('meta[name="csrf-token"]')
|
||||||
.getAttribute("content")}`,
|
.getAttribute("content"),
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
|
"Accept": "application/json",
|
||||||
},
|
},
|
||||||
then: (data) =>
|
then: (data) =>
|
||||||
data.data.map((item) => [
|
data.data.map((item) => [
|
||||||
@@ -130,10 +131,11 @@ class DataSettings {
|
|||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
credentials: "include",
|
credentials: "include",
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: `Bearer ${document
|
"X-CSRF-TOKEN": document
|
||||||
.querySelector('meta[name="api-token"]')
|
.querySelector('meta[name="csrf-token"]')
|
||||||
.getAttribute("content")}`,
|
.getAttribute("content"),
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
|
"Accept": "application/json",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user