diff --git a/client/src/utils/RenderTemplate.js b/client/src/utils/RenderTemplate.js index f8b837817..f103111cf 100644 --- a/client/src/utils/RenderTemplate.js +++ b/client/src/utils/RenderTemplate.js @@ -3,7 +3,7 @@ import { notification } from "antd"; import jsreport from "@jsreport/browser-client"; import _ from "lodash"; import moment from "moment"; -//import { auth } from "../firebase/firebase.utils"; +import { auth } from "../firebase/firebase.utils"; import { setEmailOptions } from "../redux/email/email.actions"; import { store } from "../redux/store"; import client from "../utils/GraphQLClient"; @@ -309,8 +309,8 @@ export const GenerateDocuments = async (templates) => { const fetchContextData = async (templateObject, jsrAuth) => { const bodyshop = store.getState().user.bodyshop; - // jsreport.headers["Authorization"] = - // "Bearer " + (await auth.currentUser.getIdToken()); + jsreport.headers["FirebaseAuthorization"] = + "Bearer " + (await auth.currentUser.getIdToken()); const folders = await cleanAxios.get(`${server}/odata/folders`, { headers: { Authorization: jsrAuth },