Skip to content
Draft
Show file tree
Hide file tree
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
3 changes: 1 addition & 2 deletions frontend/app/analysis/index/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
task,
hash,
} from "ember-concurrency";
import fetch from "fetch";
import moment from "moment";

import config from "../../config/environment";
Expand Down Expand Up @@ -319,7 +318,7 @@ export default class AnalysisController extends QPController {
),
);

const res = await fetch(`${url}?${queryString}`, {
const res = await window.fetch(`${url}?${queryString}`, {
headers: {
Authorization: `Bearer ${this.jwt}`,
},
Expand Down
6 changes: 2 additions & 4 deletions frontend/app/services/fetch.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import Service, { service } from "@ember/service";
import { isEmpty } from "@ember/utils";
import { isUnauthorizedResponse } from "ember-fetch/errors";
import { handleUnauthorized } from "ember-simple-auth-oidc";
import fetch from "fetch";

const CONTENT_TYPE = "application/vnd.api+json";

Expand Down Expand Up @@ -53,10 +51,10 @@ export default class FetchService extends Service {
init.body = stringifyBodyData(init);
}

const response = await fetch(resource, init);
const response = await window.fetch(resource, init);

if (!response.ok) {
if (isUnauthorizedResponse(response)) {
if (response.status === 401) {
/* istanbul ignore next */
return handleUnauthorized(this.session);
}
Expand Down
3 changes: 0 additions & 3 deletions frontend/ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ module.exports = function (defaults) {
// sassOptions: {
// onlyIncluded: true,
// },
"ember-fetch": {
preferNative: true,
},
"ember-simple-auth": {
useSessionSetupMethod: true,
},
Expand Down
3 changes: 1 addition & 2 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
"ember-data": "5.3.4",
"ember-decorators": "6.1.1",
"ember-event-helpers": "^0.1.1",
"ember-fetch": "8.1.2",
"ember-focus-trap": "^1.1.1",
"ember-in-viewport": "4.1.0",
"ember-keyboard": "^9.0.1",
Expand Down Expand Up @@ -154,4 +153,4 @@
}
},
"packageManager": "[email protected]+sha512.b2dc20e2fc72b3e18848459b37359a32064663e5627a51e4c74b2c29dd8e8e0491483c3abb40789cfd578bf362fb6ba8261b05f0387d76792ed6e23ea3b1b6a0"
}
}
3 changes: 0 additions & 3 deletions frontend/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading