ee2e4f207874775563fa78a6b99404fcf8e24402
[squeep-indie-auther] / src / template / authorization-error-html.js
1 'use strict';
2
3 const th = require('./template-helper');
4
5
6 /**
7 *
8 * @param {Object} ctx
9 * @param {Object} ctx.session
10 * @param {String=} ctx.session.error
11 * @param {String[]=} ctx.session.errorDescriptions
12 * @param {Object} options
13 * @param {Object} options.manager
14 * @param {String} options.manager.pageTitle
15 * @param {String} options.manager.footerEntries
16 * @returns {String}
17 */
18 module.exports = (ctx, options) => {
19 const htmlOptions = {
20 pageTitle: options.manager.pageTitle,
21 logoUrl: options.manager.logoUrl,
22 footerEntries: options.manager.footerEntries,
23 errorContent: ctx.errorContent || ['Unknown Error'],
24 };
25 return th.htmlPage(0, ctx, htmlOptions, []);
26 };