mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 15:31:15 -05:00
Add callback_type column to service_callback_api table
Also add service_callback_type table with allowed types
This commit is contained in:
@@ -11,7 +11,8 @@ from app.errors import (
|
||||
)
|
||||
from app.models import (
|
||||
ServiceInboundApi,
|
||||
ServiceCallbackApi
|
||||
ServiceCallbackApi,
|
||||
DELIVERY_STATUS_CALLBACK_TYPE,
|
||||
)
|
||||
from app.schema_validation import validate
|
||||
from app.service.service_callback_api_schema import (
|
||||
@@ -88,6 +89,7 @@ def create_service_callback_api(service_id):
|
||||
data = request.get_json()
|
||||
validate(data, create_service_callback_api_schema)
|
||||
data["service_id"] = service_id
|
||||
data["callback_type"] = DELIVERY_STATUS_CALLBACK_TYPE
|
||||
callback_api = ServiceCallbackApi(**data)
|
||||
try:
|
||||
save_service_callback_api(callback_api)
|
||||
|
||||
Reference in New Issue
Block a user