Skip to content

Commit

Permalink
Review fixes based on comments
Browse files Browse the repository at this point in the history
Signed-off-by: Antoine Mazeas <[email protected]>
  • Loading branch information
karthanistyr committed Jan 20, 2020
1 parent 3aadf0c commit f65f4c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions maubot/management/frontend/src/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.

var BASE_PATH = "/_matrix/maubot/v1"
let BASE_PATH = "/_matrix/maubot/v1"

export function setBasePath(basePath) {
BASE_PATH = basePath
Expand Down Expand Up @@ -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,
Expand Down
3 changes: 1 addition & 2 deletions maubot/management/frontend/src/pages/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down

0 comments on commit f65f4c5

Please sign in to comment.