Fixing small bugs that prevented API Explorer rendering.
This commit is contained in:
Родитель
8bd8573002
Коммит
5d6e0c8f81
|
@ -10,8 +10,8 @@ script
|
|||
el: $('#api-explorer'),
|
||||
isAuth: #{isAuth},
|
||||
tenantDomain: '#{tenantDomain}',
|
||||
clientId: '#{account.globalClientId}',
|
||||
clientSecret: '#{account.globalClientSecret}',
|
||||
clientId: '#{globalClientID}',
|
||||
clientSecret: '#{globalClientSecret}',
|
||||
docsDomain: '#{docsDomain}',
|
||||
user: !{JSON.stringify(user)},
|
||||
readOnly: #{readOnly}
|
||||
|
|
|
@ -25,6 +25,10 @@ module.exports = function (req, res, next) {
|
|||
name: req.user.name,
|
||||
mail: req.user.mail
|
||||
};
|
||||
|
||||
jadeContext.globalClientSecret = res.locals.account.globalClientSecret;
|
||||
jadeContext.globalClientID = res.locals.account.globalClientId;
|
||||
|
||||
} else {
|
||||
jadeContext.readOnly = true;
|
||||
jadeContext.user = {
|
||||
|
@ -35,7 +39,7 @@ module.exports = function (req, res, next) {
|
|||
}
|
||||
|
||||
res.locals.apiExplorer = function (ctx) {
|
||||
jadeContext = copyDictionary(jadeContext, ctx);
|
||||
jadeContext = extend(jadeContext, ctx);
|
||||
return tmpl(jadeContext);
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче