From 289606a6139dbf601115a2014e37303296374753 Mon Sep 17 00:00:00 2001 From: Bruno Dias Date: Sun, 23 Jun 2024 00:29:10 -0300 Subject: [PATCH] fixed imports. --- routing/package.lisp | 17 ++++++++++++++--- wst.routing.asd | 4 +++- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/routing/package.lisp b/routing/package.lisp index c5ace96..8ed17ae 100644 --- a/routing/package.lisp +++ b/routing/package.lisp @@ -8,6 +8,12 @@ (:import-from #:str #:split #:join) + (:import-from #:flexi-streams + #:make-flexi-stream) + (:import-from #:com.inuoe.jzon + #:parse) + (:import-from #:uiop + #:read-file-string) (:export #:any-route-handler #:route @@ -20,7 +26,10 @@ #:dispatch-route-by-name #:response #:not-found-response - #:internal-server-error-response)) + #:internal-server-error-response + #:condition-handler + #:change-static-path + #:route-static)) (in-package #:wst.routing) @@ -203,8 +212,10 @@ (t (err) (log:error "unhandled error ~a" err) (if *condition-handler* - (funcall *condition-handler* err) - (funcall #'internal-server-error-response request nil))))) + (let ((response (funcall *condition-handler* err))) + (if (not response) + (funcall #'internal-server-error-response request nil) + response)))))) (defun dispatch-route (path method request) "Dispatch a route by its PATH and METHOD. Pass REQUEST to it." diff --git a/wst.routing.asd b/wst.routing.asd index ff865fe..913ae65 100644 --- a/wst.routing.asd +++ b/wst.routing.asd @@ -2,7 +2,9 @@ :depends-on (#:alexandria #:str #:cl-hash-util - #:serapeum + #:flexi-streams + #:serapeum + #:com.inuoe.jzon #:log4cl) :pathname "routing" :serial t