mirror of
https://github.com/caronc/apprise-api.git
synced 2025-08-15 01:02:24 +02:00
enforce text based input
This commit is contained in:
@ -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'))
|
||||
|
Reference in New Issue
Block a user