mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-13 14:44:43 -04:00
Remove LZString compression for data storage
This commit is contained in:
parent
c904083d1f
commit
f6d8e3ab00
5 changed files with 28 additions and 37 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue