diff options
Diffstat (limited to 'lazybones-hunchentoot.lisp')
-rw-r--r-- | lazybones-hunchentoot.lisp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lazybones-hunchentoot.lisp b/lazybones-hunchentoot.lisp index e87fbd7..b010052 100644 --- a/lazybones-hunchentoot.lisp +++ b/lazybones-hunchentoot.lisp @@ -63,9 +63,11 @@ UNINSTALL-APP, START-SERVER, and STOP-SERVER." (h:stop server)) (defun install-app (server app) - "Installs a LAZYBONES:APP instance to SERVER." - ;; TODO add assertsion here - (push (if (symbolp app) (lzb:app app) app) (acceptor-apps server))) + "Installs a LAZYBONES:APP instance to SERVER, first checking that +the app exists. If app is already isntalled, does nothing." + (a:if-let (app (and app (if (symbolp app) (lzb:app app) app))) + (pushnew app (acceptor-apps server) :key 'lzb::app-name) + (error () "No app to install."))) (defun uninstall-app (server app) (setf (acceptor-apps server) |