From 10954e0a6eb47a59c17b9e9ef580126c4adb7db6 Mon Sep 17 00:00:00 2001 From: Ilija Lazoroski Date: Wed, 28 Sep 2022 16:45:28 +0200 Subject: [PATCH] Island: Use UUID for AgentSignals endpoint parameter --- .../cc/resources/agent_signals/agent_signals.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/monkey/monkey_island/cc/resources/agent_signals/agent_signals.py b/monkey/monkey_island/cc/resources/agent_signals/agent_signals.py index f6ce22f71..1103722b5 100644 --- a/monkey/monkey_island/cc/resources/agent_signals/agent_signals.py +++ b/monkey/monkey_island/cc/resources/agent_signals/agent_signals.py @@ -1,6 +1,7 @@ import logging from http import HTTPStatus +from common.types import AgentID from monkey_island.cc.resources.AbstractResource import AbstractResource from monkey_island.cc.services import AgentSignalsService @@ -8,7 +9,7 @@ logger = logging.getLogger(__name__) class AgentSignals(AbstractResource): - urls = ["/api/agent-signals/"] + urls = ["/api/agent-signals/"] def __init__( self, @@ -16,6 +17,6 @@ class AgentSignals(AbstractResource): ): self._agent_signals_service = agent_signals_service - def get(self, agent_id: str): + def get(self, agent_id: AgentID): agent_signals = self._agent_signals_service.get_signals(agent_id) return agent_signals.dict(simplify=True), HTTPStatus.OK