mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-26 21:58:28 -04:00
Added mock to client request for get request of count
This commit is contained in:
committed by
Carlo Costino
parent
83767b8ba8
commit
62a09c5223
@@ -290,8 +290,12 @@ def init_app(application):
|
||||
|
||||
if service_id:
|
||||
global_limit = current_app.config["GLOBAL_SERVICE_MESSAGE_LIMIT"]
|
||||
global_messages_count = service_api_client.get_global_notification_count(service_id)
|
||||
remaining_global_messages = global_limit - global_messages_count.get("count")
|
||||
global_messages_count = (
|
||||
service_api_client.get_global_notification_count(service_id)
|
||||
)
|
||||
remaining_global_messages = global_limit - global_messages_count.get(
|
||||
"count"
|
||||
)
|
||||
return {"daily_global_messages_remaining": remaining_global_messages}
|
||||
|
||||
@application.before_request
|
||||
|
||||
Reference in New Issue
Block a user