dispose note from cache before update
This commit is contained in:
@@ -59,12 +59,11 @@ app.post('/note', function (req, res) {
|
|||||||
return sendResponse(res, 400, "Signature mismatch");
|
return sendResponse(res, 400, "Signature mismatch");
|
||||||
if (action == "POST")
|
if (action == "POST")
|
||||||
storage.addNote(note, password).then(goToNote);
|
storage.addNote(note, password).then(goToNote);
|
||||||
else
|
else {
|
||||||
storage.updateNote(id, password, note).then(note => {
|
CACHE.del(id);
|
||||||
CACHE.del(note.id);
|
storage.updateNote(id, password, note).then(goToNote,
|
||||||
goToNote(note);
|
error => sendResponse(res, 403, error.message));
|
||||||
},
|
}
|
||||||
error => sendResponse(res, 403, error.message))
|
|
||||||
});
|
});
|
||||||
|
|
||||||
app.get("/:year/:month/:day/:title", function (req, res) {
|
app.get("/:year/:month/:day/:title", function (req, res) {
|
||||||
|
|||||||
Reference in New Issue
Block a user