FIX: prevents chat-api to generate double slash URLS (#19549)
It was not causing any visible issue, but better generate the proper URL.
This commit is contained in:
parent
a56e679723
commit
4f04a51e17
|
@ -213,28 +213,28 @@ export default class ChatApi extends Service {
|
||||||
}
|
}
|
||||||
|
|
||||||
#getRequest(endpoint, data = {}) {
|
#getRequest(endpoint, data = {}) {
|
||||||
return ajax(`${this.#basePath}/${endpoint}`, {
|
return ajax(`${this.#basePath}${endpoint}`, {
|
||||||
type: "GET",
|
type: "GET",
|
||||||
data,
|
data,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
#putRequest(endpoint, data = {}) {
|
#putRequest(endpoint, data = {}) {
|
||||||
return ajax(`${this.#basePath}/${endpoint}`, {
|
return ajax(`${this.#basePath}${endpoint}`, {
|
||||||
type: "PUT",
|
type: "PUT",
|
||||||
data,
|
data,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
#postRequest(endpoint, data = {}) {
|
#postRequest(endpoint, data = {}) {
|
||||||
return ajax(`${this.#basePath}/${endpoint}`, {
|
return ajax(`${this.#basePath}${endpoint}`, {
|
||||||
type: "POST",
|
type: "POST",
|
||||||
data,
|
data,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
#deleteRequest(endpoint, data = {}) {
|
#deleteRequest(endpoint, data = {}) {
|
||||||
return ajax(`${this.#basePath}/${endpoint}`, {
|
return ajax(`${this.#basePath}${endpoint}`, {
|
||||||
type: "DELETE",
|
type: "DELETE",
|
||||||
data,
|
data,
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue