summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/response.js52
1 files changed, 2 insertions, 50 deletions
diff --git a/lib/response.js b/lib/response.js
index 4f572e47..3cbd3203 100644
--- a/lib/response.js
+++ b/lib/response.js
@@ -55,12 +55,10 @@ var response = {
function responseError (res, code, detail, msg) {
res.status(code).render('error.ejs', {
- url: config.serverURL,
title: code + ' ' + detail + ' ' + msg,
code: code,
detail: detail,
- msg: msg,
- useCDN: config.useCDN
+ msg: msg
})
}
@@ -69,26 +67,6 @@ function showIndex (req, res, next) {
var deleteToken = ''
var data = {
- url: config.serverURL,
- useCDN: config.useCDN,
- allowAnonymous: config.allowAnonymous,
- allowAnonymousEdits: config.allowAnonymousEdits,
- facebook: config.isFacebookEnable,
- twitter: config.isTwitterEnable,
- github: config.isGitHubEnable,
- gitlab: config.isGitLabEnable,
- mattermost: config.isMattermostEnable,
- dropbox: config.isDropboxEnable,
- google: config.isGoogleEnable,
- ldap: config.isLDAPEnable,
- ldapProviderName: config.ldap.providerName,
- saml: config.isSAMLEnable,
- oauth2: config.isOAuth2Enable,
- oauth2ProviderName: config.oauth2.providerName,
- email: config.isEmailEnable,
- allowEmailRegister: config.allowEmailRegister,
- allowPDFExport: config.allowPDFExport,
- openID: config.isOpenIDEnable,
signin: authStatus,
infoMessage: req.flash('info'),
errorMessage: req.flash('error'),
@@ -124,27 +102,7 @@ function responseCodiMD (res, note) {
'X-Robots-Tag': 'noindex, nofollow' // prevent crawling
})
res.render('codimd.ejs', {
- url: config.serverURL,
- title: title,
- useCDN: config.useCDN,
- allowAnonymous: config.allowAnonymous,
- allowAnonymousEdits: config.allowAnonymousEdits,
- facebook: config.isFacebookEnable,
- twitter: config.isTwitterEnable,
- github: config.isGitHubEnable,
- gitlab: config.isGitLabEnable,
- mattermost: config.isMattermostEnable,
- dropbox: config.isDropboxEnable,
- google: config.isGoogleEnable,
- ldap: config.isLDAPEnable,
- ldapProviderName: config.ldap.providerName,
- oauth2ProviderName: config.oauth2.providerName,
- saml: config.isSAMLEnable,
- oauth2: config.isOAuth2Enable,
- email: config.isEmailEnable,
- allowEmailRegister: config.allowEmailRegister,
- allowPDFExport: config.allowPDFExport,
- openID: config.isOpenIDEnable
+ title: title
})
}
@@ -254,16 +212,13 @@ function showPublishNote (req, res, next) {
var updatetime = note.lastchangeAt
var title = models.Note.decodeTitle(note.title)
title = models.Note.generateWebTitle(meta.title || title)
- var origin = config.serverURL
var data = {
title: title,
description: meta.description || (markdown ? models.Note.generateDescription(markdown) : null),
viewcount: note.viewcount,
createtime: createtime,
updatetime: updatetime,
- url: origin,
body: body,
- useCDN: config.useCDN,
owner: note.owner ? note.owner.id : null,
ownerprofile: note.owner ? models.User.getProfile(note.owner) : null,
lastchangeuser: note.lastchangeuser ? note.lastchangeuser.id : null,
@@ -634,18 +589,15 @@ function showPublishSlide (req, res, next) {
var updatetime = note.lastchangeAt
var title = models.Note.decodeTitle(note.title)
title = models.Note.generateWebTitle(meta.title || title)
- var origin = config.serverURL
var data = {
title: title,
description: meta.description || (markdown ? models.Note.generateDescription(markdown) : null),
viewcount: note.viewcount,
createtime: createtime,
updatetime: updatetime,
- url: origin,
body: markdown,
theme: meta.slideOptions && utils.isRevealTheme(meta.slideOptions.theme),
meta: JSON.stringify(extracted.meta),
- useCDN: config.useCDN,
owner: note.owner ? note.owner.id : null,
ownerprofile: note.owner ? models.User.getProfile(note.owner) : null,
lastchangeuser: note.lastchangeuser ? note.lastchangeuser.id : null,