Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decorators are lost when module is mounted #31

Open
enikesha opened this issue Feb 26, 2015 · 0 comments
Open

Decorators are lost when module is mounted #31

enikesha opened this issue Feb 26, 2015 · 0 comments

Comments

@enikesha
Copy link

Decorators defined on define-route are lost when this module is mounted as sub-module into other module.

My simplified situation is like this:

packages.lisp

(restas:define-module #:test
  (:use #:cl))

(restas:define-module #:test.admin
  (:use #:cl))

admin.lisp

(in-package #:test.admin)

(defclass login-required-route (routes:proxy-route) ())
(defmethod restas:process-route ((route login-required-route) bindings)
  (break)) ;; Not breaking
(defun @login-required (route)
  (make-instance 'login-required-route :target route))

(restas:define-route admin-index ("")
  (:decorators '@login-required)
  "In admin")

test.lisp

(in-package #:test)

(restas:mount-module admin (#:test.admin)
  (:url "admin"))

Going to /admin/ is not actually breaking in this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant