diff --git a/gophish/client.py b/gophish/client.py index 61e0562..a945a24 100644 --- a/gophish/client.py +++ b/gophish/client.py @@ -10,7 +10,10 @@ class GophishClient(object): def __init__(self, api_key, host=DEFAULT_URL, **kwargs): self.api_key = api_key - self.host = host + if host.endswith('/'): + self.host = host + else: + self.host = host + '/' self._client_kwargs = kwargs def execute(self, method, path, **kwargs): diff --git a/gophish/models.py b/gophish/models.py index c0f3d8e..2d8dc59 100644 --- a/gophish/models.py +++ b/gophish/models.py @@ -55,6 +55,7 @@ class Campaign(Model): _valid_properties = { 'id': None, 'name': None, + 'description': None, 'created_date': datetime.now(tzlocal()), 'launch_date': datetime.now(tzlocal()), 'send_by_date': None, @@ -339,6 +340,7 @@ class Template(Model): _valid_properties = { 'id': None, 'name': None, + 'description': None, 'text': None, 'html': None, 'modified_date': datetime.now(tzlocal()), @@ -370,6 +372,7 @@ class Page(Model): _valid_properties = { 'id': None, 'name': None, + 'description': None, 'html': None, 'modified_date': datetime.now(tzlocal()), 'capture_credentials': False,