diff --git a/plugins/chat/assets/javascripts/discourse/services/chat-api.js b/plugins/chat/assets/javascripts/discourse/services/chat-api.js index 4a24d8a9b6e..d03cb4a8a0a 100644 --- a/plugins/chat/assets/javascripts/discourse/services/chat-api.js +++ b/plugins/chat/assets/javascripts/discourse/services/chat-api.js @@ -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, });