Remove and replace all note id compression in LZString with base64url

Signed-off-by: Max Wu <jackymaxj@gmail.com>
This commit is contained in:
Max Wu
2018-02-26 16:43:29 +08:00
parent 912cce2b40
commit baa0418fb5
4 changed files with 34 additions and 8 deletions

View File

@@ -5,7 +5,6 @@ var cookie = require('cookie')
var cookieParser = require('cookie-parser')
var url = require('url')
var async = require('async')
var LZString = require('lz-string')
var randomcolor = require('randomcolor')
var Chance = require('chance')
var chance = new Chance()
@@ -703,7 +702,7 @@ function operationCallback (socket, operation) {
}
function updateHistory (userId, note, time) {
var noteId = note.alias ? note.alias : LZString.compressToBase64(note.id)
var noteId = note.alias ? note.alias : models.Note.encodeNoteId(note.id)
if (note.server) history.updateHistory(userId, noteId, note.server.document, time)
}