mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-11 09:27:56 -04:00
Created service_callback_api daos
This commit is contained in:
@@ -4,6 +4,7 @@ import uuid
|
||||
from app import db
|
||||
from app.dao.jobs_dao import dao_create_job
|
||||
from app.dao.service_inbound_api_dao import save_service_inbound_api
|
||||
from app.dao.service_callback_api_dao import save_service_callback_api
|
||||
from app.dao.service_sms_sender_dao import update_existing_sms_sender_with_inbound_number, dao_update_service_sms_sender
|
||||
from app.models import (
|
||||
ApiKey,
|
||||
@@ -18,6 +19,7 @@ from app.models import (
|
||||
Service,
|
||||
ServiceEmailReplyTo,
|
||||
ServiceInboundApi,
|
||||
ServiceCallbackApi,
|
||||
ServiceLetterContact,
|
||||
ScheduledNotification,
|
||||
ServicePermission,
|
||||
@@ -301,6 +303,20 @@ def create_service_inbound_api(
|
||||
return service_inbound_api
|
||||
|
||||
|
||||
def create_service_callback_api(
|
||||
service,
|
||||
url="https://something.com",
|
||||
bearer_token="some_super_secret",
|
||||
):
|
||||
service_callback_api = ServiceCallbackApi(service_id=service.id,
|
||||
url=url,
|
||||
bearer_token=bearer_token,
|
||||
updated_by_id=service.users[0].id
|
||||
)
|
||||
save_service_callback_api(service_callback_api)
|
||||
return service_callback_api
|
||||
|
||||
|
||||
def create_organisation(colour='blue', logo='test_x2.png', name='test_org_1'):
|
||||
data = {
|
||||
'colour': colour,
|
||||
|
||||
Reference in New Issue
Block a user