Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix router of the insight #701

Merged
merged 1 commit into from
Jan 20, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion server/insight/router.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import json
from typing import Optional

Check failure on line 2 in server/insight/router.py

View workflow job for this annotation

GitHub Actions / build

Ruff (F401)

insight/router.py:2:20: F401 `typing.Optional` imported but unused
from fastapi import APIRouter, Depends

Check failure on line 3 in server/insight/router.py

View workflow job for this annotation

GitHub Actions / build

Ruff (F401)

insight/router.py:3:32: F401 `fastapi.Depends` imported but unused
from insight.service.issue import get_issue_data
from insight.service.pr import get_code_changes, get_pr_data

Expand Down Expand Up @@ -38,7 +38,7 @@
return json.dumps({"success": False, "message": str(e)})


@router.get("code_change")
@router.get("/code_change")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The route path was corrected by adding a leading slash to ensure proper routing. This change is crucial for the endpoint to be accessible as intended.

def get_code_change_insight(repo_name: str):
try:
result = get_code_changes(repo_name)
Expand Down
Loading