From e5947122bae1115b024be354ace6885cb360037e Mon Sep 17 00:00:00 2001 From: ckonstanski Date: Tue, 22 Dec 2020 09:19:28 -0700 Subject: updated to latest bootstrap --- service/rest-service.lisp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'service/rest-service.lisp') 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)) "/"))) -- cgit v1.3