mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +00:00
webhooks: Rename api_key_only_webhook_view to webhook_view.
There are no other types of webhook views; this is more concise.
This commit is contained in:
committed by
Tim Abbott
parent
8cfacbf8aa
commit
cf6ebb9c8d
@@ -2,7 +2,7 @@
|
||||
from django.http import HttpRequest, HttpResponse
|
||||
from django.utils.translation import ugettext as _
|
||||
|
||||
from zerver.decorator import api_key_only_webhook_view
|
||||
from zerver.decorator import webhook_view
|
||||
from zerver.lib.request import REQ, has_request_variables
|
||||
from zerver.lib.response import json_error, json_success
|
||||
from zerver.lib.webhooks.common import check_send_webhook_message
|
||||
@@ -19,7 +19,7 @@ New blog user registered:
|
||||
""".strip()
|
||||
WP_LOGIN_TEMPLATE = 'User {name} logged in.'
|
||||
|
||||
@api_key_only_webhook_view("Wordpress", notify_bot_owner_on_invalid_json=False)
|
||||
@webhook_view("Wordpress", notify_bot_owner_on_invalid_json=False)
|
||||
@has_request_variables
|
||||
def api_wordpress_webhook(request: HttpRequest, user_profile: UserProfile,
|
||||
hook: str=REQ(default="WordPress Action"),
|
||||
|
||||
Reference in New Issue
Block a user