mirror of
https://github.com/caronc/apprise-api.git
synced 2024-12-12 09:50:50 +01:00
enforce text based input
This commit is contained in:
parent
0899a5a2b3
commit
4c53995456
@ -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'))
|
||||
|
Loading…
Reference in New Issue
Block a user