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:
Alex Vandiver
2020-08-19 15:32:15 -07:00
committed by Tim Abbott
parent 8cfacbf8aa
commit cf6ebb9c8d
77 changed files with 159 additions and 159 deletions

View File

@@ -3,7 +3,7 @@ from typing import Any, Dict, Optional
from django.http import HttpRequest, HttpResponse
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.webhooks.common import get_http_headers_from_filename
from zerver.lib.webhooks.git import get_pull_request_event_message
@@ -34,7 +34,7 @@ def format_pull_request_event(payload: Dict[str, Any],
return get_pull_request_event_message(**data)
@api_key_only_webhook_view('Gitea')
@webhook_view('Gitea')
@has_request_variables
def api_gitea_webhook(request: HttpRequest, user_profile: UserProfile,
payload: Dict[str, Any]=REQ(argument_type='body'),