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