Skip to content

Commit

Permalink
Remove email from aux file download call
Browse files Browse the repository at this point in the history
  • Loading branch information
kdid committed May 2, 2024
1 parent b1c0c1d commit e079161
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { Button } from "@nulib/design-system";
import { IconDownload } from "@js/components/Icon";
import { toastWrapper } from "@js/services/helpers";
import { useWorkState } from "@js/context/work-context";
import { AuthContext } from "@js/components/Auth/Auth";
import { GET_DCAPI_ENDPOINT } from "@js/components/UI/ui.gql";
import { getApiResponse } from "@js/services/get-api-response";
import { useQuery } from "@apollo/client";
Expand All @@ -18,12 +17,11 @@ const WorkFilesetActionButtonsAuxiliary = ({ fileSet }) => {
const url = `${iiifServerUrl}${fileSet.id}${IIIF_SIZES.IIIF_FULL}`;
const { altFileFormat, isImage, isAltFormat } = useFileSet();
const { dcApiToken } = useWorkState();
const currentUser = useContext(AuthContext);
const { data: dataDcApiEndpoint } = useQuery(GET_DCAPI_ENDPOINT);

const handleDownloadFile = async () => {
const dcApiFileSet = `${dataDcApiEndpoint?.dcapiEndpoint?.url}/file-sets/${fileSet.id}`;
const uri = `${dcApiFileSet}/download?email=${currentUser?.email}`;
const uri = `${dcApiFileSet}/download`;

try {
const response = await getApiResponse(uri, dcApiToken);
Expand Down

0 comments on commit e079161

Please sign in to comment.