Island: Use IPv4Address in resources.IPAddresses

This commit is contained in:
Mike Salvatore 2022-09-23 08:42:32 -04:00
parent 526fd6f941
commit c2f3def33b
1 changed files with 3 additions and 2 deletions

View File

@ -1,3 +1,4 @@
from ipaddress import IPv4Address
from typing import Sequence
from monkey_island.cc.resources.AbstractResource import AbstractResource
@ -11,8 +12,8 @@ class IPAddresses(AbstractResource):
urls = ["/api/island/ip-addresses"]
def __init__(self, ip_addresses: Sequence[str]):
self._ips = ip_addresses
def __init__(self, ip_addresses: Sequence[IPv4Address]):
self._ips = list(map(str, ip_addresses))
@jwt_required
def get(self) -> Sequence[str]: