Add firebase auth to JSR call.
This commit is contained in:
@@ -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 },
|
||||
|
||||
Reference in New Issue
Block a user