disable CORS

This commit is contained in:
Admin 2025-08-18 15:02:33 +07:00
parent ac365acbfc
commit fa51ddc304
1 changed files with 8 additions and 8 deletions

View File

@ -21,7 +21,7 @@ export class BaseApiService<T extends { id: number }> {
const response = await axios({ const response = await axios({
url: this.resourceUrl, url: this.resourceUrl,
params: params, params: params,
withCredentials: true, // withCredentials: true,
method: "GET", method: "GET",
}); });
@ -32,7 +32,7 @@ export class BaseApiService<T extends { id: number }> {
try { try {
const response = await axios({ const response = await axios({
url: this.resourceUrl + "/" + id, url: this.resourceUrl + "/" + id,
withCredentials: true, // withCredentials: true,
method: "GET", method: "GET",
}); });
@ -54,7 +54,7 @@ export class BaseApiService<T extends { id: number }> {
const newData = removeUndefinedValues(data); const newData = removeUndefinedValues(data);
const { data: result } = await axios({ const { data: result } = await axios({
url: this.resourceUrl, url: this.resourceUrl,
withCredentials: true, // withCredentials: true,
method: "POST", method: "POST",
data: newData, data: newData,
}); });
@ -78,7 +78,7 @@ export class BaseApiService<T extends { id: number }> {
const cleaned = removeUndefinedValues(data); const cleaned = removeUndefinedValues(data);
const { data: result } = await axios({ const { data: result } = await axios({
url: `${this.resourceUrl}/${id}`, url: `${this.resourceUrl}/${id}`,
withCredentials: true, // withCredentials: true,
method: "PUT", method: "PUT",
data: cleaned, data: cleaned,
}); });
@ -97,7 +97,7 @@ export class BaseApiService<T extends { id: number }> {
try { try {
const { data } = await axios({ const { data } = await axios({
url: `${this.resourceUrl}/${entity.id}`, url: `${this.resourceUrl}/${entity.id}`,
withCredentials: true, // withCredentials: true,
method: "DELETE", method: "DELETE",
}); });
@ -118,7 +118,7 @@ export class BaseApiService<T extends { id: number }> {
try { try {
const { data } = await axios({ const { data } = await axios({
url: `${this.resourceUrl}/bulk-delete`, url: `${this.resourceUrl}/bulk-delete`,
withCredentials: true, // withCredentials: true,
method: "DELETE", method: "DELETE",
data: { ids }, data: { ids },
}); });
@ -140,7 +140,7 @@ export class BaseApiService<T extends { id: number }> {
try { try {
const { data } = await axios({ const { data } = await axios({
url: `${this.resourceUrl}/bulk-update`, url: `${this.resourceUrl}/bulk-update`,
withCredentials: true, // withCredentials: true,
method: "PUT", method: "PUT",
data: entities, data: entities,
}); });
@ -168,7 +168,7 @@ export class BaseApiService<T extends { id: number }> {
url: `${this.resourceUrl}/${endpoint}/${id}`, url: `${this.resourceUrl}/${endpoint}/${id}`,
method: method || "POST", method: method || "POST",
data: removeUndefinedValues(payload || {}), data: removeUndefinedValues(payload || {}),
withCredentials: true, // withCredentials: true,
}); });
if (options.toast_success) { if (options.toast_success) {