mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-26 15:34:18 +02:00
Add tests when custom path is provided
This commit is contained in:
parent
510f3fb3f2
commit
852952dd6d
2 changed files with 207 additions and 1 deletions
|
|
@ -127,7 +127,10 @@ def make_route(action, component, config, required_scopes, root_path) -> Route:
|
|||
]:
|
||||
path = f"/{{{config['param']}}}/{action}"
|
||||
else:
|
||||
path = f"/{component}s/{{{config['param']}}}/{action}"
|
||||
if root_path != "/" and required_scopes is None:
|
||||
path = f"{root_path}/{component}s/{{{config['param']}}}/{action}"
|
||||
else:
|
||||
path = f"/{component}s/{{{config['param']}}}/{action}"
|
||||
|
||||
return Route(path, endpoint=endpoint, methods=["POST"])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue