Skip to content
Snippets Groups Projects

Rebased with v1.0.0 and added support for upload selection and launch token forwarding.

Closed Lauri Himanen requested to merge north-upload-launch into north
1 unresolved thread
+ 8
7
@@ -23,13 +23,14 @@ import {
useRecoilState
} from 'recoil'
import PropTypes from 'prop-types'
import { apiBase, appBase } from '../config'
import { apiBase } from '../config'
import { makeStyles, Typography } from '@material-ui/core'
import LoginLogout from './LoginLogout'
import { useKeycloak } from 'react-keycloak'
import axios from 'axios'
import { useErrors } from './errors'
import * as searchQuantities from '../searchQuantities.json'
const apiBaseNORTH = `${apiBase.split('/').slice(0, -1).join('/')}/north`
export class DoesNotExist extends Error {
constructor(msg) {
@@ -303,8 +304,8 @@ class Api {
const auth = await this.authHeaders()
try {
const result = await this.axios.get(
`${appBase}/north/tools/`,
auth
'/tools/',
{...auth, baseURL: apiBaseNORTH}
)
return result.data
} catch (errors) {
@@ -320,8 +321,8 @@ class Api {
const auth = await this.authHeaders()
try {
const result = await this.axios.get(
`${appBase}/north/instances/`,
auth
'/instances/',
{...auth, baseURL: apiBaseNORTH}
)
return result.data
} catch (errors) {
@@ -344,9 +345,9 @@ class Api {
}
try {
const result = await this.axios.post(
`${appBase}/north/instances/`,
'/instances/',
instance,
auth
{...auth, baseURL: apiBaseNORTH}
)
return result.data
} catch (errors) {
Loading