Merged in release/2023-05-05 (pull request #754)
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 jsreport from "@jsreport/browser-client";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
//import { auth } from "../firebase/firebase.utils";
|
import { auth } from "../firebase/firebase.utils";
|
||||||
import { setEmailOptions } from "../redux/email/email.actions";
|
import { setEmailOptions } from "../redux/email/email.actions";
|
||||||
import { store } from "../redux/store";
|
import { store } from "../redux/store";
|
||||||
import client from "../utils/GraphQLClient";
|
import client from "../utils/GraphQLClient";
|
||||||
@@ -309,8 +309,8 @@ export const GenerateDocuments = async (templates) => {
|
|||||||
const fetchContextData = async (templateObject, jsrAuth) => {
|
const fetchContextData = async (templateObject, jsrAuth) => {
|
||||||
const bodyshop = store.getState().user.bodyshop;
|
const bodyshop = store.getState().user.bodyshop;
|
||||||
|
|
||||||
// jsreport.headers["Authorization"] =
|
jsreport.headers["FirebaseAuthorization"] =
|
||||||
// "Bearer " + (await auth.currentUser.getIdToken());
|
"Bearer " + (await auth.currentUser.getIdToken());
|
||||||
|
|
||||||
const folders = await cleanAxios.get(`${server}/odata/folders`, {
|
const folders = await cleanAxios.get(`${server}/odata/folders`, {
|
||||||
headers: { Authorization: jsrAuth },
|
headers: { Authorization: jsrAuth },
|
||||||
|
|||||||
Reference in New Issue
Block a user