Skip to content

Commit d0ce288

Browse files
Update analyzers/react_analyzer.py
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent 8f7c578 commit d0ce288

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

analyzers/react_analyzer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ def _extract_nextjs_api_routes(self) -> list[EndpointInfo]:
337337
def _parse_api_route(self, api_file: Path, api_dir: Path) -> list[EndpointInfo]:
338338
"""Parse a Pages Router API route file."""
339339
rel_path = api_file.relative_to(api_dir)
340-
route_path = "/api/" + str(rel_path.with_suffix(""))
340+
route_path = "/api/" + rel_path.with_suffix("").as_posix()
341341
route_path = route_path.replace("/index", "")
342342
route_path = re.sub(r"\[([^\]]+)\]", r":\1", route_path)
343343

0 commit comments

Comments
 (0)