diff --git a/monkey/monkey_island/cc/resources/island_mode.py b/monkey/monkey_island/cc/resources/island_mode.py index cf8a3679e..889b25a26 100644 --- a/monkey/monkey_island/cc/resources/island_mode.py +++ b/monkey/monkey_island/cc/resources/island_mode.py @@ -18,7 +18,7 @@ class IslandMode(flask_restful.Resource): mode_str = body.get("mode") try: mode = IslandModeEnum(mode_str) - mode_value = set_mode(mode) - return make_response({"status": "MODE_FOUND", "mode": mode_value}, 200) + set_mode(mode) + return make_response({}, 200) except ValueError: - return make_response({"status": "MODE_NOT_FOUND"}, 404) + return make_response({}, 404) diff --git a/monkey/monkey_island/cc/services/mode/island_mode_service.py b/monkey/monkey_island/cc/services/mode/island_mode_service.py index 75041d2c1..05195e301 100644 --- a/monkey/monkey_island/cc/services/mode/island_mode_service.py +++ b/monkey/monkey_island/cc/services/mode/island_mode_service.py @@ -6,4 +6,3 @@ def set_mode(mode: IslandModeEnum): island_mode_model = IslandMode() island_mode_model.mode = mode.value island_mode_model.save() - return mode.value diff --git a/vulture_allowlist.py b/vulture_allowlist.py index 618fabaa6..5a430dc6c 100644 --- a/vulture_allowlist.py +++ b/vulture_allowlist.py @@ -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 config_schema # monkey_island\cc\resources\configuration_import.py:25 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 WINDOWS_PBA_TYPE # unused variable (monkey/monkey_island/cc/resources/pba_file_upload.py:23)