request: Rename validator parameter of REQ to json_validator.

This makes it much more clear that this feature does JSON encoding,
which previously was only indicated in the documentation.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2021-04-07 13:00:44 -07:00
committed by Tim Abbott
parent 93d2ae8092
commit f0e655f1d8
39 changed files with 291 additions and 259 deletions

View File

@@ -10,7 +10,7 @@ from zerver.models import UserProfile
@human_users_only
@has_request_variables
def set_tutorial_status(
request: HttpRequest, user_profile: UserProfile, status: str = REQ(validator=check_string)
request: HttpRequest, user_profile: UserProfile, status: str = REQ(json_validator=check_string)
) -> HttpResponse:
if status == "started":
user_profile.tutorial_status = UserProfile.TUTORIAL_STARTED