Skip to content

Commit 17f561f

Browse files
committed
Make @Routing.route('/') decoration work. This decoration matches
'rest/' (note trailing /). Make sure that a path reduced to "rest" is rewritten to "rest/" so we can handle the root of the rest tree.
1 parent 373b174 commit 17f561f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

roundup/rest.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,9 @@ def decorator(func):
208208
def execute(cls, instance, path, method, input):
209209
# format the input
210210
path = path.strip('/').lower()
211+
if path == 'rest':
212+
# allow handler to be called for /rest/
213+
path = 'rest/'
211214
method = method.upper()
212215

213216
# find the rule match the path

0 commit comments

Comments
 (0)