Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

onboarding: Migrate to typed_endpoint.

Kenneth Rodrigues199d641faed9
diff --git a/zerver/views/onboarding_steps.py b/zerver/views/onboarding_steps.py
index e00bf74a381..890036a2496 100644
--- a/zerver/views/onboarding_steps.py
+++ b/zerver/views/onboarding_steps.py
@@ -5,15 +5,15 @@ from zerver.actions.onboarding_steps import do_mark_onboarding_step_as_read
from zerver.decorator import human_users_only
from zerver.lib.exceptions import JsonableError
from zerver.lib.onboarding_steps import ALL_ONBOARDING_STEPS
-from zerver.lib.request import REQ, has_request_variables
from zerver.lib.response import json_success
+from zerver.lib.typed_endpoint import typed_endpoint
from zerver.models import UserProfile
@human_users_only
-@has_request_variables
+@typed_endpoint
def mark_onboarding_step_as_read(
- request: HttpRequest, user: UserProfile, onboarding_step: str = REQ()
+ request: HttpRequest, user: UserProfile, *, onboarding_step: str
) -> HttpResponse:
if not any(step.name == onboarding_step for step in ALL_ONBOARDING_STEPS):
raise JsonableError(