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