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:
Joffrey JAFFEUX 2022-12-21 16:07:21 +01:00 committed by GitHub
parent a56e679723
commit 4f04a51e17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -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,
}); });