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.lisp19
1 files changed, 13 insertions, 6 deletions
diff --git a/service/rest-service.lisp b/service/rest-service.lisp
index 3c122f7..e57af23 100644
--- a/service/rest-service.lisp
+++ b/service/rest-service.lisp
@@ -10,17 +10,24 @@
(location-p :initarg :location-p
:initform t
:accessor location-p)
- (errormsg :initarg :errormsg
- :initform nil
- :accessor errormsg)
(message :initarg :message
:initform nil
- :accessor message))
+ :accessor message)
+ (errormsg :initarg :errormsg
+ :initform nil
+ :accessor errormsg))
(:documentation ""))
(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))))
+ (when (location-p rest-service)
+ (if (message rest-service)
+ (setf (session-value :message) (message rest-service))
+ (setf (message rest-service) (session-value :message)))
+ (if (errormsg rest-service)
+ (setf (session-value :errormsg) (errormsg rest-service))
+ (setf (errormsg rest-service) (session-value :errormsg)))
+ (when (null (location rest-service))
+ (setf (location rest-service) (type-to-path rest-service)))))
(defun location-json (&optional (location "/home"))
(format nil "{\"location\":\"~a\"}" location))