Skip to content

Commit

Permalink
Merge pull request #274 from bento-platform/fix/drs-token
Browse files Browse the repository at this point in the history
fix: passing auth header to drs search
  • Loading branch information
davidlougheed authored Jul 31, 2023
2 parents 67b1c03 + 899ab52 commit c558d05
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/components/manager/drs/ManagerDRSContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { throttle } from "lodash";
import { Layout, Input, Table, Descriptions, message } from "antd";

import { LAYOUT_CONTENT_STYLE } from "../../../styles/layoutContent";
import { makeAuthorizationHeader, useAuthorizationHeader } from "../../../lib/auth/utils";
import { useAuthorizationHeader } from "../../../lib/auth/utils";

import DownloadButton from "../DownloadButton";

Expand Down Expand Up @@ -72,8 +72,7 @@ const ManagerDRSContent = () => {

setLoading(true);

const authHeaders = makeAuthorizationHeader(authHeader);
fetch(`${drsUrl}/search?` + new URLSearchParams({ q: sv }), { method: "GET", headers: authHeaders })
fetch(`${drsUrl}/search?` + new URLSearchParams({ q: sv }), { method: "GET", headers: authHeader })
.then((r) => Promise.all([Promise.resolve(r.ok), r.json()]))
.then(([ok, data]) => {
if (ok) {
Expand Down

0 comments on commit c558d05

Please sign in to comment.