diff --git a/maubot/management/frontend/src/api.js b/maubot/management/frontend/src/api.js index 2ee7127..1f720e0 100644 --- a/maubot/management/frontend/src/api.js +++ b/maubot/management/frontend/src/api.js @@ -14,7 +14,7 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -var BASE_PATH = "/_matrix/maubot/v1" +let BASE_PATH = "/_matrix/maubot/v1" export function setBasePath(basePath) { BASE_PATH = basePath @@ -245,7 +245,6 @@ export async function doClientAuth(server, type, username, password) { } export default { - BASE_PATH, login, ping, setBasePath, getFeatures, remoteGetFeatures, openLogSocket, debugOpenFile, debugOpenFileEnabled, updateDebugOpenFileEnabled, diff --git a/maubot/management/frontend/src/pages/Main.js b/maubot/management/frontend/src/pages/Main.js index dd5a9aa..a2162a4 100644 --- a/maubot/management/frontend/src/pages/Main.js +++ b/maubot/management/frontend/src/pages/Main.js @@ -47,10 +47,9 @@ class Main extends Component { }) const apiPathJson = await resp.json() const apiPath = apiPathJson.api_path - console.log(apiPath) api.setBasePath(`${apiPath}`) } catch (err) { - console.error(err) + console.error("Failed to get API path:", err) } }