Skip to content

Commit

Permalink
use the ctx url for the 202 fromFetch
Browse files Browse the repository at this point in the history
  • Loading branch information
aptmac committed Jan 31, 2025
1 parent 6f9432c commit ace07b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/Shared/Services/Report.service.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ export class ReportService {
if (resp.status == 202) {
let subj = new Subject<AnalysisResult[]>();
resp.text().then((jobId) => {
this.jobIds.set(jobId, resp.headers.get('Location') || parts[0]);
this.jobIds.set(jobId, parts[0]);
this._jobCompletion
.asObservable()
.pipe(filter((id) => id === jobId))
.subscribe((id) => {
const jobUrl = this.jobIds.get(id);
if (!jobUrl) throw new Error(`Unknown job ID: ${id}`);
this.jobIds.delete(id);
fromFetch(jobUrl, parts[1]).subscribe((resp) => {
fromFetch(parts[0], parts[1]).subscribe((resp) => {
if (resp.ok && resp.status === 200) {
resp
.text()
Expand Down

0 comments on commit ace07b6

Please sign in to comment.