diff --git a/src/data/files.ts b/src/data/files.ts index 032f679..ce5347a 100644 --- a/src/data/files.ts +++ b/src/data/files.ts @@ -174,6 +174,8 @@ export const getPreviewData = async (file: LogFile) => { headers: { "Content-Type": "application/json", Accept: "application/json", + Authorization: + "Bearer " + (await firebase.auth().currentUser?.getIdToken()), }, } ); diff --git a/src/pages/FileModal.tsx b/src/pages/FileModal.tsx index 15cd5a3..3f9d1a6 100644 --- a/src/pages/FileModal.tsx +++ b/src/pages/FileModal.tsx @@ -1,4 +1,5 @@ import React, { useEffect, useState } from "react"; +import firebase from "firebase/app"; import axios from "axios"; import { LogFile, @@ -74,6 +75,8 @@ const FileModal: React.FC = ({ file, onExited }) => { headers: { "Content-Type": "application/json", Accept: "application/json", + Authorization: + "Bearer " + (await firebase.auth().currentUser?.getIdToken()), }, } );