From c02659869ab103c465b76991f257f79cc188f3d7 Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Tue, 25 Oct 2022 14:04:20 -0400 Subject: [PATCH] [153] update notifiarr endpoint --- VERSION | 2 +- modules/notifiarr.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/VERSION b/VERSION index 429eae9f..019e3d02 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.17.3-develop152 +1.17.3-develop153 diff --git a/modules/notifiarr.py b/modules/notifiarr.py index 502fb40c..d0d22f03 100644 --- a/modules/notifiarr.py +++ b/modules/notifiarr.py @@ -16,8 +16,8 @@ class Notifiarr: self.test = params["test"] logger.secret(self.apikey) logger.debug(f"Environment: {'Test' if self.test else 'Develop' if self.develop else 'Production'}") - url, _ = self.get_url("user/validate/") - response = self.config.get(url) + url, _ = self.get_url("user/pmm/") + response = self.config.get(url, params={"fetch": "settings"}) try: response_json = response.json() except JSONDecodeError as e: @@ -26,7 +26,7 @@ class Notifiarr: if response.status_code >= 400 or ("result" in response_json and response_json["result"] == "error"): logger.debug(f"Response: {response_json}") raise Failed(f"({response.status_code} [{response.reason}]) {response_json}") - if not params["test"] and not response_json["details"]["response"]: + if not self.test and not response_json["details"]["response"]: raise Failed("Notifiarr Error: Invalid apikey") def get_url(self, path):