flask-rest-jsonapi icon indicating copy to clipboard operation
flask-rest-jsonapi copied to clipboard

Specific decorators

Open BnGx opened this issue 4 years ago • 0 comments

It would be better to implement method-specific decorators to give more flexibility of use as appropriate by transforming this definition:

class PersonList (ResourceDetail):
     decorators = (cached, login_required)

in the following and more customizable definition:

class PersonList (ResourceDetail):
     decorators = {
         'get': (cached,),
         'post': (login_required,),
     }

BnGx avatar Feb 08 '21 10:02 BnGx