From d4f49aab4a39aa3402f60213ca44df4ba6d6dd0b 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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/hyap.hy b/app/hyap.hy index 9ba82e3..5ce60d9 100644 --- a/app/hyap.hy +++ b/app/hyap.hy @@ -7,7 +7,7 @@ [url] (.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})))))) + (with/a [client (.AsyncClient httpx)] + (let [headers {"User-Agent" config.USER_AGENT + "Accept" config.AP_CONTENT_TYPE}] + (await (.get client url :headers headers)))))))