We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8f7c578 commit d0ce288Copy full SHA for d0ce288
analyzers/react_analyzer.py
@@ -337,7 +337,7 @@ def _extract_nextjs_api_routes(self) -> list[EndpointInfo]:
337
def _parse_api_route(self, api_file: Path, api_dir: Path) -> list[EndpointInfo]:
338
"""Parse a Pages Router API route file."""
339
rel_path = api_file.relative_to(api_dir)
340
- route_path = "/api/" + str(rel_path.with_suffix(""))
+ route_path = "/api/" + rel_path.with_suffix("").as_posix()
341
route_path = route_path.replace("/index", "")
342
route_path = re.sub(r"\[([^\]]+)\]", r":\1", route_path)
343
0 commit comments