Add basic support for create and update actions in API views
customer views only for now, will add more upon further testing
This commit is contained in:
parent
7c0d9c4f93
commit
3d3ace1c2a
2 changed files with 81 additions and 5 deletions
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
#
|
||||
# Rattail -- Retail Software Framework
|
||||
# Copyright © 2010-2018 Lance Edgar
|
||||
# Copyright © 2010-2019 Lance Edgar
|
||||
#
|
||||
# This file is part of Rattail.
|
||||
#
|
||||
|
@ -49,10 +49,18 @@ class CustomerView(APIMasterView):
|
|||
def collection_get(self):
|
||||
return self._collection_get()
|
||||
|
||||
@view(permission='customers.create')
|
||||
def collection_post(self):
|
||||
return self._collection_post()
|
||||
|
||||
@view(permission='customers.view')
|
||||
def get(self):
|
||||
return self._get()
|
||||
|
||||
@view(permission='customers.edit')
|
||||
def post(self):
|
||||
return self._post()
|
||||
|
||||
|
||||
def includeme(config):
|
||||
config.scan(__name__)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue