From f6d8e3ab00370a78c0c788ad1e37a7ff77a53555 Mon Sep 17 00:00:00 2001 From: Wu Cheng-Han Date: Mon, 2 Jan 2017 10:59:53 +0800 Subject: Remove LZString compression for data storage --- lib/response.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lib/response.js') diff --git a/lib/response.js b/lib/response.js index 2b38cf25..f591d5ed 100755 --- a/lib/response.js +++ b/lib/response.js @@ -75,7 +75,7 @@ function showIndex(req, res, next) { } function responseHackMD(res, note) { - var body = LZString.decompressFromBase64(note.content); + var body = note.content; var meta = null; try { meta = models.Note.parseMeta(metaMarked(body).meta); @@ -191,7 +191,7 @@ function showPublishNote(req, res, next) { if (!note) { return response.errorNotFound(res); } - var body = LZString.decompressFromBase64(note.content); + var body = note.content; var meta = null; var markdown = null; try { @@ -248,7 +248,7 @@ function actionSlide(req, res, note) { } function actionDownload(req, res, note) { - var body = LZString.decompressFromBase64(note.content); + var body = note.content; var title = models.Note.decodeTitle(note.title); var filename = title; filename = encodeURIComponent(filename); @@ -265,7 +265,7 @@ function actionDownload(req, res, note) { } function actionInfo(req, res, note) { - var body = LZString.decompressFromBase64(note.content); + var body = note.content; var meta = null; var markdown = null; try { @@ -297,7 +297,7 @@ function actionInfo(req, res, note) { } function actionPDF(req, res, note) { - var body = LZString.decompressFromBase64(note.content); + var body = note.content; try { body = metaMarked(body).markdown; } catch(err) { @@ -479,7 +479,7 @@ function githubActionGist(req, res, note) { if (!error && httpResponse.statusCode == 200) { var access_token = body.access_token; if (access_token) { - var content = LZString.decompressFromBase64(note.content); + var content = note.content; var title = models.Note.decodeTitle(note.title); var filename = title.replace('/', ' ') + '.md'; var gist = { @@ -579,7 +579,7 @@ function showPublishSlide(req, res, next) { if (!note) { return response.errorNotFound(res); } - var body = LZString.decompressFromBase64(note.content); + var body = note.content; var meta = null; var markdown = null; try { -- cgit v1.2.3