Adds the PATCH method to extensions
The URLs registered in extensions support methods like POST, PUT, GET, DELETE but do not support PATCH method. Added the PATCH method extensions to the supported method by via "edit" action. Change-Id: I7f2386010ab01309cf04084a1f9930fcac478d07 Closes-Bug: #1467500
This commit is contained in:
parent
67b68a9bcc
commit
1cff63bd16
|
@ -545,6 +545,11 @@ class TroveExtensionMiddleware(ExtensionMiddleware):
|
|||
mapper.resource(resource_ext.collection,
|
||||
resource_ext.collection, **kargs)
|
||||
|
||||
mapper.connect(("/%s/{id}" % resource_ext.collection),
|
||||
controller=controller_resource,
|
||||
action='edit',
|
||||
conditions={'method': ['PATCH']})
|
||||
|
||||
# extended actions
|
||||
action_resources = self._action_ext_resources(application, ext_mgr,
|
||||
mapper)
|
||||
|
|
Loading…
Reference in New Issue