From 8b8a9c5e099d8bf37c44b227a4f8961faa23d93c Mon Sep 17 00:00:00 2001 From: blankie Date: Sat, 8 Oct 2022 16:12:30 +0700 Subject: [PATCH] bb --- src/page-file.rkt | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/page-file.rkt b/src/page-file.rkt index d57c839..84ff02f 100644 --- a/src/page-file.rkt +++ b/src/page-file.rkt @@ -78,22 +78,22 @@ (define source-url (format "~a/wiki/~a" origin prefixed-title)) (thread-let - ([media-detail (define dest-url - (format "~a/wikia.php?~a" - origin - (params->query `(("format" . "json") - ("controller" . "Lightbox") - ("method" . "getMediaDetail") - ("fileTitle" . prefixed-title))))) - (log-outgoing dest-url) - (define dest-res (easy:get dest-url #:timeouts timeouts)) - (easy:response-json dest-res)] - [license (license-auto wikiname)])) + ([media-detail (define dest-url + (format "~a/wikia.php?~a" + origin + (params->query `(("format" . "json") + ("controller" . "Lightbox") + ("method" . "getMediaDetail") + ("fileTitle" . prefixed-title))))) + (log-outgoing dest-url) + (define dest-res (easy:get dest-url #:timeouts timeouts)) + (easy:response-json dest-res)] + [license (license-auto wikiname)])) (if (not (jp "/exists" media-detail #f)) (next-dispatcher) (response-handler - (define title (jp "/fileTitle" media-detail))) + (define title (jp "/fileTitle" media-detail)) (define body (generate-results-page #:source-url source-url #:wikiname wikiname @@ -108,7 +108,7 @@ (response/output #:code 200 (λ (out) - (write-html body out))))) + (write-html body out)))))) ;(module+ test ; (check-not-false ((query-selector (attribute-selector 'href "/test/wiki/Ankle_Monitor") ; (generate-results-page