Skip to content

Commit

Permalink
path arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
victorteokw committed Feb 18, 2024
1 parent fc9508f commit 45a53f3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/request/ctx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,8 @@ impl RequestCtx {
teo_inner: static_self.teo_inner.handler_match()
}
}

pub fn path_arguments(&self, py: Python<'_>) -> PyResult<PyObject> {
self.handler_match().captures(py)
}
}
5 changes: 5 additions & 0 deletions teo/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,11 @@ class RequestCtx:
"""
...

def path_arguments(self) -> Any:
"""
Get the path arguments.
"""


class ObjectId:
"""
Expand Down

0 comments on commit 45a53f3

Please sign in to comment.