mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 23:41:17 -05:00
Don’t require template when content is provided
So that the admin app can create broadcasts without a template it needs to be allowed to create broadcasts from content instead.
This commit is contained in:
@@ -15,8 +15,13 @@ create_broadcast_message_schema = {
|
||||
'finishes_at': {'type': 'string', 'format': 'datetime'},
|
||||
'areas': {"type": "array", "items": {"type": "string"}},
|
||||
'simple_polygons': {"type": "array", "items": {"type": "array"}},
|
||||
'content': {'type': 'string', 'minLength': 1, 'maxLength': 1395},
|
||||
},
|
||||
'required': ['template_id', 'service_id', 'created_by'],
|
||||
'required': ['service_id', 'created_by'],
|
||||
'oneOf': [
|
||||
{'required': ['template_id']},
|
||||
{'required': ['content']},
|
||||
],
|
||||
'additionalProperties': False
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user