UI: Use only string from api/island/mode
This commit is contained in:
parent
86242a021d
commit
cf084242f0
|
@ -115,7 +115,7 @@ class AppComponent extends AuthComponent {
|
|||
setMode = () => {
|
||||
return IslandHttpClient.get('/api/island/mode')
|
||||
.then(res => {
|
||||
this.setState({islandMode: res.body.mode});
|
||||
this.setState({islandMode: res.body});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ const LandingPageComponent = (props: Props) => {
|
|||
}
|
||||
|
||||
function setScenario(scenario: string) {
|
||||
IslandHttpClient.put('/api/island/mode', {'mode': scenario})
|
||||
IslandHttpClient.put('/api/island/mode', scenario)
|
||||
.then(() => {
|
||||
props.onStatusChange();
|
||||
});
|
||||
|
|
|
@ -111,9 +111,9 @@ const IslandResetModal = (props: Props) => {
|
|||
if (res.ok) {
|
||||
return auth.authFetch('/api/propagation-credentials/configured-credentials', {method: 'PUT', body:'[]'})
|
||||
}})
|
||||
.then(res => {
|
||||
.then(res => {
|
||||
if (res.ok) {
|
||||
return auth.authFetch('/api/island/mode', {method: 'PUT', body: '{"mode": "unset"}'})
|
||||
return auth.authFetch('/api/island/mode', {method: 'PUT', body: '"unset"'})
|
||||
}})
|
||||
.then(res => {
|
||||
if (!res.ok) {
|
||||
|
|
Loading…
Reference in New Issue