(url, fileName)
| 2948 | } |
| 2949 | }; |
| 2950 | export const fetchUrl = async (url, fileName) => { |
| 2951 | try { |
| 2952 | const response = await fetch(url); |
| 2953 | if (!response.ok) { |
| 2954 | alert(i18n.t("something-went-wrong-mssg")); |
| 2955 | throw new Error("Network response was not ok"); |
| 2956 | } |
| 2957 | const blob = await response.blob(); |
| 2958 | saveAs(blob, fileName); |
| 2959 | } catch (error) { |
| 2960 | alert(i18n.t("something-went-wrong-mssg")); |
| 2961 | console.error("Error downloading the file:", error); |
| 2962 | } |
| 2963 | }; |
| 2964 | |
| 2965 | export const getSignedUrl = async (pdfUrl, docId, templateId) => { |
| 2966 | //use only axios here due to public template sign |
no outgoing calls
no test coverage detected