add feature for reusable route filters
aacanakin opened this issue · comments
Aras Can Akin commented
When defining a route with filter, it is needed to rewrite the controller mapping each time like the following;
# routes.py
urls = {
'/api': {
'/post': [
'ApiController.check_auth', # runs before me
'UserController.me'
],
'/profile': [
'ApiController.check_auth',
'ProfileController.get'
]
}
}
In this example, check_auth
is should be defined once.
Aras Can Akin commented
filters are disabled currently, decorator filters will be introduced