Skip to content

Commit

Permalink
fixed imports.
Browse files Browse the repository at this point in the history
  • Loading branch information
diasbruno committed Jun 23, 2024
1 parent 6383128 commit 289606a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
17 changes: 14 additions & 3 deletions routing/package.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)

Expand Down Expand Up @@ -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."
Expand Down
4 changes: 3 additions & 1 deletion wst.routing.asd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
:depends-on (#:alexandria
#:str
#:cl-hash-util
#:serapeum
#:flexi-streams
#:serapeum
#:com.inuoe.jzon
#:log4cl)
:pathname "routing"
:serial t
Expand Down

0 comments on commit 289606a

Please sign in to comment.