Skip to content
This repository has been archived by the owner on Dec 22, 2022. It is now read-only.

Support CommandResource #33

Open
uttamk opened this issue Jan 19, 2016 · 1 comment
Open

Support CommandResource #33

uttamk opened this issue Jan 19, 2016 · 1 comment

Comments

@uttamk
Copy link
Contributor

uttamk commented Jan 19, 2016

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

  def authorize_create_detail(self, request):
    pass

Whereas it should ideally be

 def authorize_command(self, request):
    pass
@uttamk uttamk added this to the command_and_view_resource milestone Jan 19, 2016
@uttamk
Copy link
Contributor Author

uttamk commented Jan 19, 2016

@skmvasu

@vedarthk vedarthk removed this from the command_and_view_resource milestone Jan 19, 2016
@vedarthk vedarthk added this to the Necessary Features milestone Jan 19, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants