mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +00:00
typed_endpoint: Rename WebhookPayload to JsonBodyPayload.
This kind of payload that's loaded from json in the body of the request is not only used for webhooks, but also in the push bouncer, and may get used elsewhere too - so a general name is better.
This commit is contained in:
committed by
Tim Abbott
parent
31af4fb24b
commit
ac14a8bcf5
@@ -4,7 +4,7 @@ from django.http import HttpRequest, HttpResponse
|
||||
|
||||
from zerver.decorator import webhook_view
|
||||
from zerver.lib.response import json_success
|
||||
from zerver.lib.typed_endpoint import WebhookPayload, typed_endpoint
|
||||
from zerver.lib.typed_endpoint import JsonBodyPayload, typed_endpoint
|
||||
from zerver.lib.validator import WildValue, check_int, check_string
|
||||
from zerver.lib.webhooks.common import check_send_webhook_message
|
||||
from zerver.models import UserProfile
|
||||
@@ -23,7 +23,7 @@ def api_insping_webhook(
|
||||
request: HttpRequest,
|
||||
user_profile: UserProfile,
|
||||
*,
|
||||
payload: WebhookPayload[WildValue],
|
||||
payload: JsonBodyPayload[WildValue],
|
||||
) -> HttpResponse:
|
||||
data = payload["webhook_event_data"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user