forked from p34709852/monkey
Island: Rename `api/island-mode` to `api/island/mode`
This commit is contained in:
parent
759de2a055
commit
c56c866263
|
@ -120,7 +120,7 @@ class MonkeyIslandClient(object):
|
|||
assert False
|
||||
|
||||
def _reset_island_mode(self):
|
||||
if self.requests.post("api/island-mode", data='{"mode": "unset"}').ok:
|
||||
if self.requests.post("api/island/mode", data='{"mode": "unset"}').ok:
|
||||
LOGGER.info("Resseting island mode after the test.")
|
||||
else:
|
||||
LOGGER.error("Failed to reset island mode")
|
||||
|
|
|
@ -12,7 +12,7 @@ logger = logging.getLogger(__name__)
|
|||
|
||||
|
||||
class IslandMode(AbstractResource):
|
||||
urls = ["/api/island-mode"]
|
||||
urls = ["/api/island/mode"]
|
||||
|
||||
def __init__(self, island_mode_service: IslandModeService):
|
||||
self._island_mode_service = island_mode_service
|
||||
|
|
|
@ -113,7 +113,7 @@ class AppComponent extends AuthComponent {
|
|||
};
|
||||
|
||||
setMode = () => {
|
||||
return IslandHttpClient.get('/api/island-mode')
|
||||
return IslandHttpClient.get('/api/island/mode')
|
||||
.then(res => {
|
||||
this.setState({islandMode: res.body.mode});
|
||||
});
|
||||
|
|
|
@ -74,7 +74,7 @@ const LandingPageComponent = (props: Props) => {
|
|||
}
|
||||
|
||||
function setScenario(scenario: string) {
|
||||
IslandHttpClient.post('/api/island-mode', {'mode': scenario})
|
||||
IslandHttpClient.post('/api/island/mode', {'mode': scenario})
|
||||
.then(() => {
|
||||
props.onStatusChange();
|
||||
});
|
||||
|
|
|
@ -113,7 +113,7 @@ const IslandResetModal = (props: Props) => {
|
|||
}})
|
||||
.then(res => {
|
||||
if (res.status === 200) {
|
||||
return auth.authFetch('/api/island-mode', {method: 'POST', body: '{"mode": "unset"}'})
|
||||
return auth.authFetch('/api/island/mode', {method: 'POST', body: '{"mode": "unset"}'})
|
||||
}})
|
||||
.then(res => {
|
||||
if (res.status !== 200) {
|
||||
|
|
Loading…
Reference in New Issue