mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-02 09:26:08 -05:00
Use the new mmg api
This commit is contained in:
@@ -78,8 +78,9 @@ class MMGClient(SmsClient):
|
||||
}
|
||||
|
||||
start_time = monotonic()
|
||||
mmg_url = "https://api.mmg.co.uk/json/api.php"
|
||||
try:
|
||||
response = request("POST", "https://www.mmgrp.co.uk/API/json/api.php",
|
||||
response = request("POST", mmg_url,
|
||||
data=json.dumps(data),
|
||||
headers={'Content-Type': 'application/json',
|
||||
'Authorization': 'Basic {}'.format(self.api_key)})
|
||||
@@ -89,7 +90,7 @@ class MMGClient(SmsClient):
|
||||
self.current_app.logger.info(
|
||||
"API {} request on {} succeeded with {} '{}'".format(
|
||||
"POST",
|
||||
"https://www.mmgrp.co.uk/API/json/api.php",
|
||||
mmg_url,
|
||||
response.status_code,
|
||||
response.json().items()
|
||||
)
|
||||
@@ -99,7 +100,7 @@ class MMGClient(SmsClient):
|
||||
self.current_app.logger.error(
|
||||
"API {} request on {} failed with {} '{}'".format(
|
||||
"POST",
|
||||
"https://www.mmgrp.co.uk/API/json/api.php",
|
||||
mmg_url,
|
||||
api_error.status_code,
|
||||
api_error.message
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user