Sometimes we need an API endpoint that just supports a POST or a command in CQRS terms.
Today we have a hack that people use which looks like the following
class CommandResource(CrudResource):
allowed_actions = [CrudActions.CREATE_DETAIL]
serializer_cls = CommandSerializer
This is not the optimal way of doing it because the authorization step in the pipeline follows the conventions of the CrudResource. i.e. the authorization step says
Sometimes we need an API endpoint that just supports a POST or a command in CQRS terms. Today we have a hack that people use which looks like the following
This is not the optimal way of doing it because the authorization step in the pipeline follows the conventions of the CrudResource. i.e. the authorization step says
Whereas it should ideally be