forked from p15670423/monkey
Island: Return empty post status for island mode
This commit is contained in:
parent
f9ed53a527
commit
81a8ccf673
|
@ -18,7 +18,7 @@ class IslandMode(flask_restful.Resource):
|
||||||
mode_str = body.get("mode")
|
mode_str = body.get("mode")
|
||||||
try:
|
try:
|
||||||
mode = IslandModeEnum(mode_str)
|
mode = IslandModeEnum(mode_str)
|
||||||
mode_value = set_mode(mode)
|
set_mode(mode)
|
||||||
return make_response({"status": "MODE_FOUND", "mode": mode_value}, 200)
|
return make_response({}, 200)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
return make_response({"status": "MODE_NOT_FOUND"}, 404)
|
return make_response({}, 404)
|
||||||
|
|
|
@ -6,4 +6,3 @@ def set_mode(mode: IslandModeEnum):
|
||||||
island_mode_model = IslandMode()
|
island_mode_model = IslandMode()
|
||||||
island_mode_model.mode = mode.value
|
island_mode_model.mode = mode.value
|
||||||
island_mode_model.save()
|
island_mode_model.save()
|
||||||
return mode.value
|
|
||||||
|
|
|
@ -171,6 +171,7 @@ MONKEY_LINUX_RUNNING # unused variable (monkey/monkey_island/cc/services/utils/
|
||||||
import_status # monkey_island\cc\resources\configuration_import.py:19
|
import_status # monkey_island\cc\resources\configuration_import.py:19
|
||||||
config_schema # monkey_island\cc\resources\configuration_import.py:25
|
config_schema # monkey_island\cc\resources\configuration_import.py:25
|
||||||
exception_stream # unused attribute (monkey_island/cc/server_setup.py:104)
|
exception_stream # unused attribute (monkey_island/cc/server_setup.py:104)
|
||||||
|
ADVANCED # unused attribute (monkey/monkey_island/cc/services/mode/mode_enum.py:6:)
|
||||||
|
|
||||||
# these are not needed for it to work, but may be useful extra information to understand what's going on
|
# these are not needed for it to work, but may be useful extra information to understand what's going on
|
||||||
WINDOWS_PBA_TYPE # unused variable (monkey/monkey_island/cc/resources/pba_file_upload.py:23)
|
WINDOWS_PBA_TYPE # unused variable (monkey/monkey_island/cc/resources/pba_file_upload.py:23)
|
||||||
|
|
Loading…
Reference in New Issue