summaryrefslogtreecommitdiff
path: root/service/rest-service.lisp
diff options
context:
space:
mode:
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)) "/")))