From f65f4c540bf439247e754efef12984fcb26ec1c2 Mon Sep 17 00:00:00 2001 From: Antoine Mazeas Date: Mon, 20 Jan 2020 11:19:41 +0100 Subject: [PATCH] Review fixes based on comments Signed-off-by: Antoine Mazeas --- maubot/management/frontend/src/api.js | 3 +-- maubot/management/frontend/src/pages/Main.js | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) 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) } }