summaryrefslogtreecommitdiff
path: root/service/rest-service.lisp
diff options
context:
space:
mode:
authorckonstanski <ckonstanski@pippiandcarlos.com>2020-12-22 09:19:28 -0700
committerckonstanski <ckonstanski@pippiandcarlos.com>2020-12-22 09:19:28 -0700
commite5947122bae1115b024be354ace6885cb360037e (patch)
tree0384007798115997a8e04517b1763685303253f6 /service/rest-service.lisp
parent0ed1cba1b39daaf8eef693233f081b455c88dece (diff)
updated to latest bootstrap
Diffstat (limited to 'service/rest-service.lisp')
-rw-r--r--service/rest-service.lisp10
1 files changed, 4 insertions, 6 deletions
diff --git a/service/rest-service.lisp b/service/rest-service.lisp
index b34817f..3c122f7 100644
--- a/service/rest-service.lisp
+++ b/service/rest-service.lisp
@@ -20,12 +20,10 @@
(defmethod initialize-instance :after ((rest-service rest-service) &key)
(when (and (location-p rest-service) (null (location rest-service)))
- (setf (location rest-service) (type-to-path rest-service))
- (setf (session-value :location) (location rest-service))))
+ (setf (location rest-service) (type-to-path rest-service))))
-(defun location-json ()
- (let ((location (if (session-value :location) (session-value :location) "/home")))
- (format nil "{\"location\":\"~a\"}" location)))
+(defun location-json (&optional (location "/home"))
+ (format nil "{\"location\":\"~a\"}" location))
(defun type-to-path (rest-type)
- (concatenate 'string "/" (ppcre:regex-replace "-" (string-downcase (type-of rest-type)) "/")))
+ (concatenate 'string "/" (ppcre:regex-replace "-service" (string-downcase (type-of rest-type)) "/")))