Skip to content

Commit 1fb6a68

Browse files
committed
2 parents 9b9af79 + 0926c40 commit 1fb6a68

13 files changed

+130
-92
lines changed

index.js

100755100644
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const {
3434

3535
const {
3636
eg001click, eg002click, eg003click,
37-
eg004click, eg005click, eg006click
37+
eg004click, eg005click, eg006click,
3838
} = require("./lib/click/controllers");
3939

4040
const {

lib/click/examples/embedClickwrap.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,5 +81,5 @@ const getInactiveClickwraps = async (args) => {
8181
return await accountApi.getClickwraps(args.accountId, {status: 'inactive'});
8282
}
8383

84-
module.exports = { getInactiveClickwraps, getActiveClickwraps, embedClickwrap };
85-
84+
module.exports = { getInactiveClickwraps, getActiveClickwraps, embedClickwrap };
85+

lib/commonControllers.js

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,27 @@ commonControllers.indexController = async (req, res) => {
3333
});
3434
}
3535
else if (req.dsAuth.checkToken(3)){
36-
let enableCFR = await isCFR(req.user.accessToken, req.session.accountId, req.session.basePath);
37-
if (enableCFR == "enabled"){
38-
res.locals.statusCFR = "enabled";
36+
if (req.session.accountId == undefined) {
37+
let enableCFR = await isCFR(req.user.accessToken, req.user.accountId, req.user.basePath);
38+
if (enableCFR == "enabled"){
39+
res.locals.statusCFR = "enabled";
40+
}
41+
res.render('pages/index', {
42+
title: "Home",
43+
documentation: dsConfig.documentation + documentationTopic,
44+
showDoc: dsConfig.documentation
45+
});
46+
} else {
47+
let enableCFR = await isCFR(req.user.accessToken, req.session.accountId, req.session.basePath);
48+
if (enableCFR == "enabled"){
49+
res.locals.statusCFR = "enabled";
50+
}
51+
res.render('pages/index', {
52+
title: "Home",
53+
documentation: dsConfig.documentation + documentationTopic,
54+
showDoc: dsConfig.documentation
55+
});
3956
}
40-
res.render('pages/index', {
41-
title: "Home",
42-
documentation: dsConfig.documentation + documentationTopic,
43-
showDoc: dsConfig.documentation
44-
});
4557
}
4658
else {
4759
res.render('pages/index', {

package-lock.json

Lines changed: 89 additions & 57 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@
4242
"fs": "0.0.1-security",
4343
"fs-extra": "^6.0.1",
4444
"helmet": "^3.18.0",
45-
"jsonwebtoken": "^8.5.1",
45+
"jsonwebtoken": "^9.0.0",
4646
"memorystore": "^1.6.1",
4747
"moment": "^2.29.4",
4848
"node-fetch": "2.6.7",
49-
"passport": "^0.6.0",
49+
"passport": "^0.4.0",
5050
"passport-docusign": "^1.1.0",
5151
"path": "^0.12.7",
5252
"request": "^2.88.2",

0 commit comments

Comments
 (0)