summaryrefslogtreecommitdiff
path: root/lib/response.js
diff options
context:
space:
mode:
authorWu Cheng-Han2017-01-02 10:59:53 +0800
committerWu Cheng-Han2017-01-02 10:59:53 +0800
commitf6d8e3ab00370a78c0c788ad1e37a7ff77a53555 (patch)
treec5bc7cf24ba0022893a2992d25d90280c38fa1d9 /lib/response.js
parentc904083d1f5064d2e786e0bc6ee3804b91805d24 (diff)
Remove LZString compression for data storage
Diffstat (limited to 'lib/response.js')
-rwxr-xr-xlib/response.js14
1 files changed, 7 insertions, 7 deletions
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 {