parent
bc87e5de01
commit
3c83e74a84
2 changed files with 3 additions and 4 deletions
|
@ -7,6 +7,8 @@
|
|||
#:regex-replace
|
||||
#:regex-replace-all)
|
||||
(:import-from #:ningle)
|
||||
(:import-from #:lack/response
|
||||
#:response-status)
|
||||
(:import-from #:trivial-system-loader
|
||||
#:load-system)
|
||||
(:export #:pathname->path
|
||||
|
@ -60,6 +62,7 @@
|
|||
(if (string= uri "/not-found")
|
||||
(let ((handler (find-symbol "HANDLE-NOT-FOUND" pkg)))
|
||||
(defmethod ningle:not-found ((app ningle:app))
|
||||
(setf (response-status ningle:*response*) 404)
|
||||
(funcall handler))))
|
||||
(loop
|
||||
:for method :in *http-request-methods*
|
||||
|
|
|
@ -1,11 +1,7 @@
|
|||
(defpackage #:ningle-fbr-test/routes/not-found
|
||||
(:use #:cl)
|
||||
(:import-from #:lack/response)
|
||||
(:import-from #:ningle)
|
||||
(:export #:handle-not-found))
|
||||
(in-package #:ningle-fbr-test/routes/not-found)
|
||||
|
||||
(defun handle-not-found ()
|
||||
(setf (lack/response:response-status ningle:*response*)
|
||||
404)
|
||||
"Not Found")
|
||||
|
|
Loading…
Add table
Reference in a new issue