diff options
author | Alexis Hovorka <[email protected]> | 2024-02-21 16:17:24 -0700 |
---|---|---|
committer | Alexis Hovorka <[email protected]> | 2024-02-21 16:17:24 -0700 |
commit | caa495340aef5b765bed193da51cd4bf48a4d570 (patch) | |
tree | 3c12ea9841961d454bfba41ab1c32889537d5804 /app/note-store.js | |
parent | 8f44593d55c82197854d9e29174fe66c4e50ebde (diff) |
Diffstat (limited to 'app/note-store.js')
-rw-r--r-- | app/note-store.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/note-store.js b/app/note-store.js index eeebf28..8ad54db 100644 --- a/app/note-store.js +++ b/app/note-store.js @@ -21,7 +21,7 @@ async function newNote(req, res) { async function getNote(req, res, match) { console.log(Date.now()+` Getting note ${req.uid}:${match.noteID}`); const noteFile = `${NOTE_DIR}/${req.uid}/${match.noteID}.md`; - const content = await rf(noteFile, "UTF-8"); + const content = await rf(noteFile, "utf8"); sj(res, {id:match.noteID, content}); } @@ -29,7 +29,7 @@ async function setNote(req, res, match, data) { console.log(Date.now()+` Setting note ${req.uid}:${match.noteID}`); if (match.noteID !== data.id) return err400(res); const noteFile = `${NOTE_DIR}/${req.uid}/${match.noteID}.md`; - await wf(noteFile, data.content, "UTF-8"); + await wf(noteFile, data.content, "utf8"); sj(res, {}); } |