diff options
| author | ckonstanski <ckonstanski@pippiandcarlos.com> | 2020-12-24 22:27:40 -0700 |
|---|---|---|
| committer | ckonstanski <ckonstanski@pippiandcarlos.com> | 2020-12-24 22:27:40 -0700 |
| commit | e678d9ba62cd44795fe8d4b882e61dfbd672729e (patch) | |
| tree | c3417e105f3eac7e31e63960b3320a6e56b1e7fd /service/auth-service.lisp | |
| parent | e54116790e06c0ec0ab0c799d62083df32c7d12a (diff) | |
fixed message and errormsg
Diffstat (limited to 'service/auth-service.lisp')
| -rw-r--r-- | service/auth-service.lisp | 11 |
1 files changed, 11 insertions, 0 deletions
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)))) |
