(objectId, contactId)
| 2854 | } |
| 2855 | }; |
| 2856 | export const getTenantDetails = async (objectId, contactId) => { |
| 2857 | try { |
| 2858 | const url = `${localStorage.getItem("baseUrl")}functions/gettenant`; |
| 2859 | const parseAppId = localStorage.getItem("parseAppId"); |
| 2860 | const accesstoken = localStorage.getItem("accesstoken"); |
| 2861 | const token = { "X-Parse-Session-Token": accesstoken }; |
| 2862 | const data = { userId: objectId, contactId: contactId }; |
| 2863 | const res = await axios.post(url, data, { |
| 2864 | headers: { |
| 2865 | "Content-Type": "application/json", |
| 2866 | "X-Parse-Application-Id": parseAppId, |
| 2867 | ...token |
| 2868 | } |
| 2869 | }); |
| 2870 | if (res.data.result) { |
| 2871 | const updateRes = JSON.parse(JSON.stringify(res.data.result)); |
| 2872 | return updateRes; |
| 2873 | } else { |
| 2874 | return ""; |
| 2875 | } |
| 2876 | } catch (err) { |
| 2877 | console.log("err in gettenant", err); |
| 2878 | return "user does not exist!"; |
| 2879 | } |
| 2880 | }; |
| 2881 | |
| 2882 | //function to convert variable string name to variable value of email body and subject |
| 2883 | export function replaceMailVaribles(subject, body, variables) { |
no outgoing calls
no test coverage detected