From a0b4a55ffa5561d2cec040ca2386bdcf5e76d679 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20M=C3=BCller?= Date: Sun, 18 Oct 2015 18:53:28 +0200 Subject: [PATCH] bugfix --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index 6fe573f..87b894b 100644 --- a/server.js +++ b/server.js @@ -54,7 +54,7 @@ app.post('/note', function (req, res) { app.get("/:year/:month/:day/:title", function (req, res) { var P = req.params, url = P.year + "/" + P.month + "/" + P.day + "/" + P.title; - storage.getNoteId(url).then(note => note ? res.redirect("/" + id) : notFound(res)); + storage.getNoteId(url).then(note => note ? res.redirect("/" + note.id) : notFound(res)); }); app.get(/\/([a-z0-9]+\/edit)/, function (req, res) {