page_params: Parse page_params and state_data with Zod.

This establishes a runtime check that their types continue to reflect
reality going forward.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2024-02-16 13:56:36 -08:00
committed by Tim Abbott
parent 4f1659fe8f
commit a4938d3760
25 changed files with 312 additions and 224 deletions

View File

@@ -80,7 +80,9 @@ def render_stats(
translation.get_language_from_path(request.path_info),
)
# Sync this with stats_params_schema in base_page_params.ts.
page_params = dict(
page_type="stats",
data_url_suffix=data_url_suffix,
upload_space_used=space_used,
guest_users=guest_users,