summaryrefslogtreecommitdiff
path: root/lib/models/note.js (unfollow)
Commit message (Collapse)AuthorFilesLines
2018-07-27Further improvement of error handling for LZStringSheogorath1-1/+5
This does some more in depth check on the error message and minimizes the log noise that is caused by LZString. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-06-24Rebrand HackMD to CodiMDSheogorath1-1/+1
Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-05-25Use cascaded deletesSheogorath1-1/+3
When we delete a user we should delete all the notes that belong to this user including the revisions of these notes. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-05-25Use hard delete instead of soft deleteSheogorath1-1/+1
Right now we only flag notes as deleted. This is no longer allowed under GDPR. Make sure you do regular backups! Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-04-10Add check for noteId lengthSheogorath1-0/+9
As we know the length of an UUID we can check if the base64 string of the provided UUID is long enough for a legacy base64 encoded nodeId and stop processing it in legacy mode, if it's not the case. This should make the ugly warning way less common. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-03-25Change config to camel case with backwards compatibilitySheogorath1-6/+6
This refactors the configs a bit to now use camel case everywhere. This change should help to clean up the config interface and make it better understandable. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-03-11Fix to log instead of throwing error on parse note idMax Wu1-2/+4
Signed-off-by: Max Wu <jackymaxj@gmail.com>
2018-03-10Fix parseNoteId order to fix some edge caseMax Wu1-7/+7
that LZString note url could be parsed by base64url note url and thus return wrong note id Signed-off-by: Max Wu <jackymaxj@gmail.com>
2018-02-27Update to use buffer in encode/decode note idMax Wu1-2/+4
Signed-off-by: Max Wu <jackymaxj@gmail.com>
2018-02-26Remove and replace all note id compression in LZString with base64urlMax Wu1-0/+27
Signed-off-by: Max Wu <jackymaxj@gmail.com>
2018-02-09Fix field type to prevent data truncation of authorship (#721)Max Wu1-1/+1
* Fix field type to prevent data truncation of authorship
2017-10-16Fix #521 by converting content fields to LONGTEXT in MySQL, to prevent ↵Claudius Coenen1-1/+1
truncation of data.
2017-05-08refactor: Remove `require` extension filenameBoHong Li1-3/+3
2017-03-14Fix update doc from filesystem cause redundant authorship stringifyWu Cheng-Han1-1/+1
2017-03-14Use strict mode in all backend filesBoHong Li1-0/+1
add ‘use strict’ in all backend file
2017-03-08Use JavaScript Standard StyleBoHong Li1-511/+500
Introduce JavaScript Standard Style as project style rule, and fixed all fail on backend code.
2017-02-10Add default permission configNV1-2/+2
2017-01-12Fix permission order and keep wording consistencyWu Cheng-Han1-1/+1
2017-01-10Adjust permission order to more clarly蒼時弦也1-1/+1
2017-01-10Add limited and protected permission蒼時弦也1-3/+3
2017-01-04Fix and refactor extracting content using metaMarked directly might lead in ↵Wu Cheng-Han1-23/+20
invalid object
2017-01-02Refactor data processing to model definitionWu Cheng-Han1-0/+9
2017-01-02Update to remove null byte before saving to DB and remove null byte on changesWu Cheng-Han1-3/+12
2017-01-02Remove LZString compression for data storageWu Cheng-Han1-11/+6
2016-11-26Update to auto generate meta description based on content in publish note ↵Wu Cheng-Han1-0/+3
and slide
2016-10-12Fix note extract tags might get encoded HTML entityWu Cheng-Han1-1/+1
2016-10-11Fix doc updating revision not stringify and compress authorship before saveWu Cheng-Han1-1/+1
2016-10-10Update to support delete noteWu Cheng-Han1-0/+1
2016-10-10Update to make note history count in server-side when user loggedWu Cheng-Han1-2/+55
2016-10-10Workaround cheerio text method shouldn't preserve html tags on fetching note ↵Wu Cheng-Han1-1/+2
title
2016-10-10Update to move authorship calculation code to note model and support update ↵Wu Cheng-Han1-1/+176
authorship after making revision of docs
2016-08-15Update slide mode to show extra info and support url actions and support ↵Wu Cheng-Han1-0/+2
disqus via yaml-metadata
2016-08-15Fix meta might be null issueWu Cheng-Han1-1/+2
2016-08-14Update to make doc only update while the filesystem content not equals db ↵Wu Cheng-Han1-4/+7
content
2016-08-01Update to support slideOptions in the YAML metadataWu Cheng-Han1-0/+2
2016-07-30Add support of saving authors and authorshipWu Cheng-Han1-0/+8
2016-07-02Update to change server-side pre-rendering engine from marked to markdown-itWu Cheng-Han1-2/+2
2016-06-21Update to support new metadata: title, description, tags and ↵Cheng-Han, Wu1-6/+32
google-analytics (GA) and refactor render publish slide response function
2016-06-17Fix create new note should not use default note created timeCheng-Han, Wu1-1/+3
2016-06-17Add support of saving note revision and improve app start and stop procedure ↵Cheng-Han, Wu1-5/+21
to ensure data integrity
2016-06-01Update note model on create doc will use the created time of the doc in ↵Cheng-Han, Wu1-0/+2
filesystem
2016-05-30Update note model if doc in filesystem have newer modified will update it in dbCheng-Han, Wu1-1/+23
2016-05-28Update project titleCheng-Han, Wu1-1/+1
2016-04-20Refactor server with Sequelize ORM, refactor server configs, now will show ↵Cheng-Han, Wu1-0/+208
note status (created or updated) and support docs (note alias)