Finalize self hosted with self certificate, resolve webhook issues.

This commit is contained in:
Patrick Fic
2026-04-20 09:49:48 -07:00
parent 969dd8be8d
commit cc48448a07
12 changed files with 236 additions and 44 deletions

View File

@@ -3,10 +3,11 @@ const { Documenso } = require("@documenso/sdk-typescript");
const axios = require("axios");
const { jsrAuthString } = require("../utils/utils");
const logger = require("../utils/logger");
const DOCUMENSO_API_KEY = "api_asojim0czruv13ud";//Done on a by team basis,
//Need to pull the key dynamically to send documents.
const DOCUMENSO_API_KEY = "api_io2lssosg9v4p2mb";//Done on a by team basis,
const documenso = new Documenso({
apiKey: DOCUMENSO_API_KEY,//Done on a by team basis,
serverURL: "https://stg-app.documenso.com/api/v2",
serverURL: "https://sign.imex.online/api/v2",
});
const JSR_SERVER = "https://reports.test.imex.online";
const jsreport = require("@jsreport/nodejs-client");
@@ -216,9 +217,9 @@ async function newEsignDocument(req, res) {
catch (error) {
logger.log(`esig-new-error`, "ERROR", "esig", "api", {
message: error.message, stack: error.stack,
body: req.body
body: _.omit(req.body, ["bodyshop"]) // bodyshop can be large, so we omit it from the logs
});
res.status(500).json({ error: "An error occurred while creating the e-sign document." });
res.status(500).json({ error: "An error occurred while creating the e-sign document.", message: error.message });
}
}