Add a new table to store the api information for a service inbound sms message.

Including:
 - url to push the inbound sms to
 - bearer_token to be added to the header of the request.

The services will be expected to manage these properties.
This commit is contained in:
Rebecca Law
2017-06-13 15:27:13 +01:00
parent 0596b210a5
commit b186cad046
4 changed files with 74 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
from app import db
from app.authentication.utils import generate_secret
from app.dao.dao_utils import transactional
@transactional
def save_service_inbound_api(service_inbound_api):
service_inbound_api.bearer_token = generate_secret(service_inbound_api.bearer_token)
db.session.add(service_inbound_api)