From e678d9ba62cd44795fe8d4b882e61dfbd672729e Mon Sep 17 00:00:00 2001 From: ckonstanski Date: Thu, 24 Dec 2020 22:27:40 -0700 Subject: fixed message and errormsg --- service/auth-service.lisp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'service/auth-service.lisp') diff --git a/service/auth-service.lisp b/service/auth-service.lisp index e5e7e27..1702bde 100644 --- a/service/auth-service.lisp +++ b/service/auth-service.lisp @@ -16,4 +16,15 @@ `(let ((,instance (make-instance ',auth-service))) (when (string= (session-value :permissions) "admin") ,@body) + (when (location-p ,instance) + (setf (session-value :message) nil) + (setf (session-value :errormsg) nil)) (org-ckons-json::objects-to-json `(,,instance)))) + +(defmacro with-noauth ((instance rest-service) &body body) + `(let ((,instance (make-instance ',rest-service))) + ,@body + (when (location-p ,instance) + (setf (session-value :message) nil) + (setf (session-value :errormsg) nil)) + (org-ckons-json::objects-to-json `(,,instance)))) -- cgit v1.3