enforce text based input

This commit is contained in:
Chris Caron 2020-12-31 10:27:11 -05:00
parent 0899a5a2b3
commit 4c53995456

View File

@ -399,8 +399,13 @@ class NotifyView(View):
status=ResponseCode.internal_server_error,
)
# Prepare ourselves a default Asset
asset = apprise.AppriseAsset(
body_format=apprise.NotifyFormat.TEXT,
)
# Prepare our apprise object
a_obj = apprise.Apprise()
a_obj = apprise.Apprise(asset=asset)
# Create an apprise config object
ac_obj = apprise.AppriseConfig()
@ -482,8 +487,13 @@ class StatelessNotifyView(View):
_('An invalid payload was specified.'),
status=ResponseCode.bad_request)
# Prepare ourselves a default Asset
asset = apprise.AppriseAsset(
body_format=apprise.NotifyFormat.TEXT,
)
# Prepare our apprise object
a_obj = apprise.Apprise()
a_obj = apprise.Apprise(asset=asset)
# Add URLs
a_obj.add(content.get('urls'))