forked from p15670423/monkey
Island: Rename `file_agent_configuration_repository` to `agent_configuration_repository` in new configuration resource
This commit is contained in:
parent
74bc55e077
commit
0d8cc713d2
|
@ -34,12 +34,12 @@ class ResponseContents:
|
||||||
class Configuration(AbstractResource):
|
class Configuration(AbstractResource):
|
||||||
urls = ["/api/configuration"]
|
urls = ["/api/configuration"]
|
||||||
|
|
||||||
def __init__(self, file_agent_configuration_repository: IAgentConfigurationRepository):
|
def __init__(self, agent_configuration_repository: IAgentConfigurationRepository):
|
||||||
self._file_agent_configuration_repository = file_agent_configuration_repository
|
self._agent_configuration_repository = agent_configuration_repository
|
||||||
|
|
||||||
@jwt_required
|
@jwt_required
|
||||||
def get(self):
|
def get(self):
|
||||||
configuration = self._file_agent_configuration_repository.get_configuration()
|
configuration = self._agent_configuration_repository.get_configuration()
|
||||||
return jsonify(configuration=configuration)
|
return jsonify(configuration=configuration)
|
||||||
|
|
||||||
@jwt_required
|
@jwt_required
|
||||||
|
@ -55,7 +55,7 @@ class Configuration(AbstractResource):
|
||||||
# Q: in what format/schema are we getting the config from the Island?
|
# Q: in what format/schema are we getting the config from the Island?
|
||||||
# Q: when does flattening the config go away?
|
# Q: when does flattening the config go away?
|
||||||
configuration_object = schema.loads(configuration_json)
|
configuration_object = schema.loads(configuration_json)
|
||||||
self._file_agent_configuration_repository.store_configuration(
|
self._agent_configuration_repository.store_configuration(
|
||||||
configuration_object
|
configuration_object
|
||||||
) # check error handling
|
) # check error handling
|
||||||
return ResponseContents().form_response()
|
return ResponseContents().form_response()
|
||||||
|
|
Loading…
Reference in New Issue