Island: Rename `api/island-mode` to `api/island/mode`

This commit is contained in:
Ilija Lazoroski 2022-08-01 12:32:49 +02:00
parent 759de2a055
commit c56c866263
5 changed files with 5 additions and 5 deletions

View File

@ -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")

View File

@ -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

View File

@ -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});
});

View File

@ -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();
});

View File

@ -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) {