Docstringsandstypehints (#4)
* added docstrings and typehints to models * param
taylor_socfortress committed
Jul 11, 2023 at 07:03 UTC
bd9522fe208b53af3261082132473b41498f7951
1 file changed
+5
-5
backend/app/routes/agents.py
+5
-5
@@ -56,7 +56,7 @@ def mark_as_critical(agent_id):
56
json: A JSON response containing the updated agent information.
57
"""
58
service = AgentService()
59
- result = service.mark_agent_as_critical(agent_id)
59
+ result = service.mark_agent_as_critical(agent_id=agent_id)
60
return result
61
62
@@ -72,7 +72,7 @@ def unmark_agent_critical(agent_id):
72
json: A JSON response containing the updated agent information.
73
"""
74
service = AgentService()
75
- result = service.mark_agent_as_non_critical(agent_id)
75
+ result = service.mark_agent_as_non_critical(agent_id=agent_id)
76
return result
77
78
@@ -101,7 +101,7 @@ def delete_agent(agent_id):
101
json: A JSON response containing the updated agent information.
102
"""
103
service = AgentService()
104
- result = service.delete_agent_db(agent_id)
104
+ result = service.delete_agent_db(agent_id=agent_id)
105
106
# Delete from WazuhManager
107
# Create instance of UniversalService
@@ -109,7 +109,7 @@ def delete_agent(agent_id):
109
110
# Pass universal_service to WazuhManagerAgentService
111
agent_service = WazuhManagerAgentService(universal_service)
112
- agent_service.delete_agent(agent_id)
112
+ agent_service.delete_agent(agent_id=agent_id)
113
114
return result
115
@@ -131,5 +131,5 @@ def get_agent_vulnerabilities(agent_id):
131
# Pass universal_service to VulnerabilityService
132
vulnerability_service = VulnerabilityService(universal_service)
133
134
- agent_vulnerabilities = vulnerability_service.agent_vulnerabilities(agent_id)
134
+ agent_vulnerabilities = vulnerability_service.agent_vulnerabilities(agent_id=agent_id)
135
return agent_vulnerabilities