Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
read-receipts: Migrate to typed endpoint.
Kenneth Rodriguesd03659ee1c5d
diff --git a/zerver/views/read_receipts.py b/zerver/views/read_receipts.pyindex f1b7b7a1187..7877664e518 100644--- a/zerver/views/read_receipts.py+++ b/zerver/views/read_receipts.py@@ -1,20 +1,21 @@from django.http.request import HttpRequestfrom django.http.response import HttpResponsefrom django.utils.translation import gettext as _+from pydantic import NonNegativeIntfrom zerver.lib.exceptions import JsonableErrorfrom zerver.lib.message import access_message-from zerver.lib.request import REQ, has_request_variablesfrom zerver.lib.response import json_success-from zerver.lib.validator import to_non_negative_int+from zerver.lib.typed_endpoint import PathOnly, typed_endpointfrom zerver.models import UserMessage, UserProfile-@has_request_variables+@typed_endpointdef read_receipts(request: HttpRequest,user_profile: UserProfile,- message_id: int = REQ(converter=to_non_negative_int, path_only=True),+ *,+ message_id: PathOnly[NonNegativeInt],) -> HttpResponse:message = access_message(user_profile, message_id)