From b052dc09fdb6f05a32c4235412eefd2c721c9a85 Mon Sep 17 00:00:00 2001 From: SouthFox Date: Sun, 10 Sep 2023 17:31:49 +0800 Subject: [PATCH] [back/perf] optional query key --- src/main/backend/core.clj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/backend/core.clj b/src/main/backend/core.clj index 9abe3a5..38b16d4 100644 --- a/src/main/backend/core.clj +++ b/src/main/backend/core.clj @@ -22,7 +22,8 @@ ["/hp/:id" {:parameters {:path {:id s/Int}} :get {:handler handlers/build-api-hu-post}}] ["/hq/:id" {:parameters {:path {:id s/Int} - :query {:session_id s/Int}} + :query {(s/optional-key :session_id) s/Int + (s/optional-key :cursor) s/Str}} :get {:handler handlers/build-api-hu-question}}]]] {:data {:coercion reitit.coercion.schema/coercion :middleware [parameters/parameters-middleware