fix(jira): always return HTTP 200 from jira-test + strip trailing slash

- jira-test now returns {status: "ok"|"error", message: ...} with
  HTTP 200 so Cloudflare never intercepts the response
- jira_service strips trailing slash from URL before creating Jira
  client (avoids double-slash in REST paths)
- Frontend reads data.status field instead of HTTP status code
This commit is contained in:
kitos
2026-05-26 17:42:12 +02:00
parent d307039a41
commit 174b7e8d24
4 changed files with 38 additions and 15 deletions
+5 -1
View File
@@ -142,8 +142,12 @@ def get_user_jira_client(user: User, db: Session):
from atlassian import Jira
# Strip trailing slash — the Atlassian library appends paths like
# /rest/api/2/myself and a trailing slash causes double-slash URLs.
clean_url = jira_url.rstrip("/")
return Jira(
url=jira_url,
url=clean_url,
username=auth_email,
password=user.jira_api_token,
cloud=True,