fix: add api catch all route with 404
This commit is contained in:
parent
8e60563e9d
commit
bad9d4294b
|
|
@ -47,6 +47,14 @@
|
||||||
;; Set JSON as the default API format
|
;; Set JSON as the default API format
|
||||||
(setf *default-api-format* "json")
|
(setf *default-api-format* "json")
|
||||||
|
|
||||||
|
(define-api || () ()
|
||||||
|
"Defines a catch all handler for non existing API routes
|
||||||
|
Overrides default radiance definition that invokes an error condition."
|
||||||
|
(api-output `(("status" . "error")
|
||||||
|
("message" . "It seems that you have hit an unidentified astronomical object."))
|
||||||
|
:message "It seems that you have hit an unidentified astronomical object."
|
||||||
|
:status 404))
|
||||||
|
|
||||||
;; Recently played tracks management
|
;; Recently played tracks management
|
||||||
(defun add-recently-played (track-info &optional (stream-type :curated))
|
(defun add-recently-played (track-info &optional (stream-type :curated))
|
||||||
"Add a track to the recently played list (max 3 tracks).
|
"Add a track to the recently played list (max 3 tracks).
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue