forked from cadence/breezewiki
bb
This commit is contained in:
parent
fe87ff26c5
commit
8b8a9c5e09
1 changed files with 13 additions and 13 deletions
|
@ -78,22 +78,22 @@
|
||||||
(define source-url (format "~a/wiki/~a" origin prefixed-title))
|
(define source-url (format "~a/wiki/~a" origin prefixed-title))
|
||||||
|
|
||||||
(thread-let
|
(thread-let
|
||||||
([media-detail (define dest-url
|
([media-detail (define dest-url
|
||||||
(format "~a/wikia.php?~a"
|
(format "~a/wikia.php?~a"
|
||||||
origin
|
origin
|
||||||
(params->query `(("format" . "json")
|
(params->query `(("format" . "json")
|
||||||
("controller" . "Lightbox")
|
("controller" . "Lightbox")
|
||||||
("method" . "getMediaDetail")
|
("method" . "getMediaDetail")
|
||||||
("fileTitle" . prefixed-title)))))
|
("fileTitle" . prefixed-title)))))
|
||||||
(log-outgoing dest-url)
|
(log-outgoing dest-url)
|
||||||
(define dest-res (easy:get dest-url #:timeouts timeouts))
|
(define dest-res (easy:get dest-url #:timeouts timeouts))
|
||||||
(easy:response-json dest-res)]
|
(easy:response-json dest-res)]
|
||||||
[license (license-auto wikiname)]))
|
[license (license-auto wikiname)]))
|
||||||
|
|
||||||
(if (not (jp "/exists" media-detail #f))
|
(if (not (jp "/exists" media-detail #f))
|
||||||
(next-dispatcher)
|
(next-dispatcher)
|
||||||
(response-handler
|
(response-handler
|
||||||
(define title (jp "/fileTitle" media-detail)))
|
(define title (jp "/fileTitle" media-detail))
|
||||||
(define body (generate-results-page
|
(define body (generate-results-page
|
||||||
#:source-url source-url
|
#:source-url source-url
|
||||||
#:wikiname wikiname
|
#:wikiname wikiname
|
||||||
|
@ -108,7 +108,7 @@
|
||||||
(response/output
|
(response/output
|
||||||
#:code 200
|
#:code 200
|
||||||
(λ (out)
|
(λ (out)
|
||||||
(write-html body out)))))
|
(write-html body out))))))
|
||||||
;(module+ test
|
;(module+ test
|
||||||
; (check-not-false ((query-selector (attribute-selector 'href "/test/wiki/Ankle_Monitor")
|
; (check-not-false ((query-selector (attribute-selector 'href "/test/wiki/Ankle_Monitor")
|
||||||
; (generate-results-page
|
; (generate-results-page
|
||||||
|
|
Loading…
Reference in a new issue