From ce4ab247e74499a71dfb28da729d33a9aa1f1b31 Mon Sep 17 00:00:00 2001 From: SouthFox Date: Tue, 27 Feb 2024 00:27:01 +0800 Subject: [PATCH] [refactor] use let define variables --- app/hyap.hy | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/hyap.hy b/app/hyap.hy index 9ba82e3..5f4781c 100644 --- a/app/hyap.hy +++ b/app/hyap.hy @@ -8,6 +8,6 @@ (.info logger url) (return (.json (with/a [client (.AsyncClient httpx)] - (await (.get client url :headers - {"User-Agent" config.USER_AGENT - "Accept" config.AP_CONTENT_TYPE})))))) + (let [headers {"User-Agent" config.USER_AGENT + "Accept" config.AP_CONTENT_TYPE}] + (await (.get client url :headers headers)))))))