|
5 | 5 | */ |
6 | 6 |
|
7 | 7 | const path = require("path"); |
8 | | - const { embedClickwrap } = require("../examples/embedClickwrap"); |
| 8 | + const { embedClickwrap, getActiveClickwraps } = require("../examples/embedClickwrap"); |
9 | 9 | const validator = require("validator"); |
10 | | - const { getClickwraps } = require("../examples/listClickwraps"); |
11 | 10 | const { getExampleByNumber } = require("../../manifestService"); |
12 | 11 | const dsConfig = require("../../../config/index.js").config; |
13 | 12 |
|
|
67 | 66 | const errorMessage = errorBody && errorBody.message; |
68 | 67 | // In production, you may want to provide customized error messages and |
69 | 68 | // remediation advice to the user |
70 | | - res.render("pages/error_eg006", { err: error, errorCode, errorMessage }); |
| 69 | + res.render("pages/error", { err: error, errorCode, errorMessage }); |
71 | 70 | } |
72 | 71 | if (results) { |
73 | 72 | // Save for use by other examples that need an clickwrapId |
|
109 | 108 | eg: eg, csrfToken: req.csrfToken(), |
110 | 109 | example: example, |
111 | 110 | sourceFile: sourceFile, |
112 | | - clickwrapsData: await getClickwraps(args), |
| 111 | + clickwrapsData: await getActiveClickwraps(args), |
113 | 112 | sourceUrl: dsConfig.githubExampleUrl + 'click/examples/' + sourceFile, |
114 | 113 | documentation: dsConfig.documentation + eg, |
115 | 114 | showDoc: dsConfig.documentation |
|
0 commit comments