From d7648e9ceaedf425d344292c77692ad67993a99f Mon Sep 17 00:00:00 2001 From: Jannik Lorenz Date: Sat, 23 Apr 2016 12:58:24 +0200 Subject: Hide Dropbox and Google Drive in Import/ Export when disabled --- lib/response.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'lib/response.js') diff --git a/lib/response.js b/lib/response.js index 7a75e234..043fdd8c 100644 --- a/lib/response.js +++ b/lib/response.js @@ -48,7 +48,7 @@ var response = { showNote: showNote, showPublishNote: showPublishNote, showPublishSlide: showPublishSlide, - showIndex: showIndex, + showIndex: showIndex, noteActions: noteActions, publishNoteActions: publishNoteActions, githubActions: githubActions @@ -72,7 +72,7 @@ function responseError(res, code, detail, msg) { code: code, detail: detail, msg: msg, - useCDN: config.usecdn + useCDN: config.usecdn }); res.write(content); res.end(); @@ -95,6 +95,7 @@ function showIndex(req, res, next) { twitter: config.twitter, github: config.github, dropbox: config.dropbox, + googleDrive: config.googleDrive, }); res.write(content); res.end(); @@ -125,6 +126,7 @@ function responseHackMD(res, note) { twitter: config.twitter, github: config.github, dropbox: config.dropbox, + googleDrive: config.googleDrive, }); var buf = html; res.writeHead(200, { @@ -355,7 +357,7 @@ function publishNoteActions(req, res, next) { res.redirect(config.serverurl + '/' + (note.alias ? note.alias : LZString.compressToBase64(note.id))); break; default: - res.redirect(config.serverurl + '/s/' + note.shortid); + res.redirect(config.serverurl + '/s/' + note.shortid); break; } }); @@ -370,7 +372,7 @@ function githubActions(req, res, next) { githubActionGist(req, res, note); break; default: - res.redirect(config.serverurl + '/' + noteId); + res.redirect(config.serverurl + '/' + noteId); break; } }); @@ -470,4 +472,4 @@ var render = function (res, title, markdown) { })); }; -module.exports = response; \ No newline at end of file +module.exports = response; -- cgit v1.2.3 From 404e44649f4fe6ee8d0ea649cf9d157c229ab52c Mon Sep 17 00:00:00 2001 From: Jannik Lorenz Date: Sat, 23 Apr 2016 14:15:24 +0200 Subject: Fix error page (missing googleDrive config) --- lib/response.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/response.js') diff --git a/lib/response.js b/lib/response.js index 043fdd8c..9d75561a 100644 --- a/lib/response.js +++ b/lib/response.js @@ -72,7 +72,8 @@ function responseError(res, code, detail, msg) { code: code, detail: detail, msg: msg, - useCDN: config.usecdn + useCDN: config.usecdn, + googleDrive: config.googleDrive, }); res.write(content); res.end(); -- cgit v1.2.3