Skip to content
8 changes: 0 additions & 8 deletions apps/OpenSign/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {
Preview
} from "react-dnd-multi-backend";
import DragElement from "./components/pdf/DragElement";
import TagManager from "react-gtm-module";
import Parse from "parse";
import "./polyfills";
import { serverUrl_fn } from "./constant/appinfo";
Expand Down Expand Up @@ -56,13 +55,6 @@ const generatePreview = (props) => {
);
};

if (process.env.REACT_APP_GTM) {
const tagManagerArgs = {
gtmId: process.env.REACT_APP_GTM
};
TagManager.initialize(tagManagerArgs);
}

const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(
<CookiesProvider defaultSetOptions={{ path: "/" }}>
Expand Down
7 changes: 0 additions & 7 deletions apps/OpenSign/src/pages/Form.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,6 @@ const Forms = (props) => {
}
} catch (err) {
if (err?.message?.includes("is encrypted")) {
try {
await Parse.Cloud.run("encryptedpdf", {
email: Parse.User.current().getEmail()
});
} catch (err) {
console.log("err in sending posthog encryptedpdf", err);
}
try {
setIsDecrypting(true);
const size = files?.[0].size;
Expand Down
2 changes: 0 additions & 2 deletions apps/OpenSignServer/cloud/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import UserAfterFind from './parsefunction/UserAfterFInd.js';
import SignatureAfterFind from './parsefunction/SignatureAfterFind.js';
import TenantAterFind from './parsefunction/TenantAfterFind.js';
import VerifyEmail from './parsefunction/VerifyEmail.js';
import encryptedpdf from './parsefunction/encryptedPdf.js';
import { getSignedUrl } from './parsefunction/getSignedUrl.js';
import createBatchDocs from './parsefunction/createBatchDocs.js';
import linkContactToDoc from './parsefunction/linkContactToDoc.js';
Expand Down Expand Up @@ -83,7 +82,6 @@ Parse.Cloud.define('getReport', getReport);
Parse.Cloud.define('getTemplate', GetTemplate);
Parse.Cloud.define('callwebhook', callWebhook);
Parse.Cloud.define('verifyemail', VerifyEmail);
Parse.Cloud.define('encryptedpdf', encryptedpdf);
Parse.Cloud.define('getsignedurl', getSignedUrl);
Parse.Cloud.define('batchdocuments', createBatchDocs);
Parse.Cloud.define('linkcontacttodoc', linkContactToDoc);
Expand Down
14 changes: 0 additions & 14 deletions apps/OpenSignServer/cloud/parsefunction/encryptedPdf.js

This file was deleted.

12 changes: 0 additions & 12 deletions apps/OpenSignServer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import AWS from 'aws-sdk';
import { app as customRoute } from './cloud/customRoute/customApp.js';
import { exec } from 'child_process';
import { createTransport } from 'nodemailer';
import { PostHog } from 'posthog-node';
import { appName, cloudServerUrl, smtpenable, smtpsecure, useLocal } from './Utils.js';
import { SSOAuth } from './auth/authadapter.js';
import createContactIndex from './migrationdb/createContactIndex.js';
Expand Down Expand Up @@ -175,16 +174,6 @@ function getUserIP(request) {
return request.socket.remoteAddress;
}
}
app.use(function (req, res, next) {
const ph_project_api_key = process.env.PH_PROJECT_API_KEY;
try {
req.posthog = new PostHog(ph_project_api_key);
} catch (err) {
// console.log('Err', err);
req.posthog = '';
}
next();
});

app.use(async function (req, res, next) {
const isFilePath = req.path.includes('files') || false;
Expand Down Expand Up @@ -225,7 +214,6 @@ if (!process.env.TESTING) {
// Mount your custom express app
app.use('/', customRoute);


// Parse Server plays nicely with the rest of your web routes
app.get('/', function (req, res) {
res.status(200).send('opensign-server is running !!!');
Expand Down