Skip to content

Commit

Permalink
++rest_api PoC: fixed /
Browse files Browse the repository at this point in the history
  • Loading branch information
zmsdev committed Jun 28, 2023
1 parent f08accf commit 2fc967d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Products/zms/_pathhandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def __bobo_traverse__(self, TraversalRequest, name):

# Package-Home.
if name == '++rest_api':
return rest_api.RestApiController(self)
return rest_api.RestApiController(self, TraversalRequest)

# Package-Home.
if name == '$ZMS_HOME':
Expand Down
6 changes: 3 additions & 3 deletions Products/zms/rest_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ class RestApiController(object):
RestApiController
"""

def __init__(self, context):
def __init__(self, context, TraversalRequest):
self.context = context

def __bobo_traverse__(self, TraversalRequest, name):
self.method = TraversalRequest['REQUEST_METHOD']
for id in TraversalRequest['path_to_handle'][1:]:
self.context = getattr(self.context, id)

def __bobo_traverse__(self, TraversalRequest, name):
return self

__call____roles__ = None
Expand Down

0 comments on commit 2fc967d

Please sign in to comment.