mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-15 15:28:50 -04:00
Replace Deskpro ad-hoc requests with a client from utils
Moves the duplicated calls to Deskpro to notification_utils and rewrites feedback and service go-live requests to use the shared client.
This commit is contained in:
@@ -25,6 +25,7 @@ from functools import partial
|
||||
|
||||
from notifications_python_client.errors import HTTPError
|
||||
from notifications_utils import logging, request_helper, formatters
|
||||
from notifications_utils.clients import DeskproClient
|
||||
from notifications_utils.clients.statsd.statsd_client import StatsdClient
|
||||
from notifications_utils.recipients import (
|
||||
validate_phone_number,
|
||||
@@ -73,6 +74,7 @@ provider_client = ProviderClient()
|
||||
organisations_client = OrganisationsClient()
|
||||
asset_fingerprinter = AssetFingerprinter()
|
||||
statsd_client = StatsdClient()
|
||||
deskpro_client = DeskproClient()
|
||||
letter_jobs_client = LetterJobsClient()
|
||||
inbound_number_client = InboundNumberClient()
|
||||
billing_api_client = BillingAPIClient()
|
||||
@@ -90,6 +92,7 @@ def create_app(application):
|
||||
|
||||
init_app(application)
|
||||
statsd_client.init_app(application)
|
||||
deskpro_client.init_app(application)
|
||||
logging.init_app(application, statsd_client)
|
||||
csrf.init_app(application)
|
||||
request_helper.init_app(application)
|
||||
|
||||
Reference in New Issue
Block a user