mypy: Amend topic REQ parameters in helloworld/mention webhooks.

This commit is contained in:
neiljp (Neil Pilgrim)
2017-12-24 20:38:44 +00:00
committed by Greg Price
parent b8f81801c1
commit 2ed1ab4b7a
2 changed files with 2 additions and 2 deletions

View File

@@ -16,7 +16,7 @@ from zerver.models import UserProfile
def api_helloworld_webhook(request: HttpRequest, user_profile: UserProfile,
payload: Dict[str, Iterable[Dict[str, Any]]]=REQ(argument_type='body'),
stream: Text=REQ(default='test'),
topic: Optional[Text]=REQ(default='Hello World')) -> HttpResponse:
topic: Text=REQ(default='Hello World')) -> HttpResponse:
# construct the body of the message
body = 'Hello! I am happy to be here! :smile:'

View File

@@ -16,7 +16,7 @@ from zerver.models import UserProfile
def api_mention_webhook(request: HttpRequest, user_profile: UserProfile,
payload: Dict[str, Iterable[Dict[str, Any]]] = REQ(argument_type='body'),
stream: Text = REQ(default='mention'),
topic: Optional[Text] = REQ(default='news')) -> HttpResponse:
topic: Text = REQ(default='news')) -> HttpResponse:
title = payload["title"]
source_url = payload["url"]
description = payload["description"]