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 = {}) {
|
||||
return ajax(`${this.#basePath}/${endpoint}`, {
|
||||
return ajax(`${this.#basePath}${endpoint}`, {
|
||||
type: "GET",
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
#putRequest(endpoint, data = {}) {
|
||||
return ajax(`${this.#basePath}/${endpoint}`, {
|
||||
return ajax(`${this.#basePath}${endpoint}`, {
|
||||
type: "PUT",
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
#postRequest(endpoint, data = {}) {
|
||||
return ajax(`${this.#basePath}/${endpoint}`, {
|
||||
return ajax(`${this.#basePath}${endpoint}`, {
|
||||
type: "POST",
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
#deleteRequest(endpoint, data = {}) {
|
||||
return ajax(`${this.#basePath}/${endpoint}`, {
|
||||
return ajax(`${this.#basePath}${endpoint}`, {
|
||||
type: "DELETE",
|
||||
data,
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue