mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 07:35:34 -05:00
This adds new endpoints to retrieve billing data from the new table:
1. Create a separate billing blueprint to house these endpoints
2. Return monthly breakdown in same format as we did before
3. Return yearly breakdown but only return {billing units, rate,
notification_type}. Admin only makes use of these.
This commit is contained in:
@@ -100,6 +100,7 @@ def register_blueprint(application):
|
||||
from app.notifications.notifications_letter_callback import letter_callback_blueprint
|
||||
from app.authentication.auth import requires_admin_auth, requires_auth, requires_no_auth, restrict_ip_sms
|
||||
from app.letters.send_letter_jobs import letter_job
|
||||
from app.billing.rest import billing_blueprint
|
||||
|
||||
service_blueprint.before_request(requires_admin_auth)
|
||||
application.register_blueprint(service_blueprint, url_prefix='/service')
|
||||
@@ -164,6 +165,9 @@ def register_blueprint(application):
|
||||
letter_callback_blueprint.before_request(requires_no_auth)
|
||||
application.register_blueprint(letter_callback_blueprint)
|
||||
|
||||
billing_blueprint.before_request(requires_admin_auth)
|
||||
application.register_blueprint(billing_blueprint)
|
||||
|
||||
|
||||
def register_v2_blueprints(application):
|
||||
from app.v2.notifications.post_notifications import v2_notification_blueprint as post_notifications
|
||||
|
||||
Reference in New Issue
Block a user