From 0d8cc713d2502601f1173bbe85d27f51c71cf94b Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Tue, 21 Jun 2022 14:35:42 -0700 Subject: [PATCH] Island: Rename `file_agent_configuration_repository` to `agent_configuration_repository` in new configuration resource --- monkey/monkey_island/cc/resources/configuration.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/monkey/monkey_island/cc/resources/configuration.py b/monkey/monkey_island/cc/resources/configuration.py index b611eaec6..0eab79bf9 100644 --- a/monkey/monkey_island/cc/resources/configuration.py +++ b/monkey/monkey_island/cc/resources/configuration.py @@ -34,12 +34,12 @@ class ResponseContents: class Configuration(AbstractResource): urls = ["/api/configuration"] - def __init__(self, file_agent_configuration_repository: IAgentConfigurationRepository): - self._file_agent_configuration_repository = file_agent_configuration_repository + def __init__(self, agent_configuration_repository: IAgentConfigurationRepository): + self._agent_configuration_repository = agent_configuration_repository @jwt_required def get(self): - configuration = self._file_agent_configuration_repository.get_configuration() + configuration = self._agent_configuration_repository.get_configuration() return jsonify(configuration=configuration) @jwt_required @@ -55,7 +55,7 @@ class Configuration(AbstractResource): # Q: in what format/schema are we getting the config from the Island? # Q: when does flattening the config go away? configuration_object = schema.loads(configuration_json) - self._file_agent_configuration_repository.store_configuration( + self._agent_configuration_repository.store_configuration( configuration_object ) # check error handling return ResponseContents().form_response()