Permalink
Browse files

Added GET /:short 404

  • Loading branch information...
1 parent d42c04b commit ad34d73c48f08609a4f050b878788ce1cf00e7c1 @tj tj committed Sep 28, 2011
Showing with 4 additions and 1 deletion.
  1. +3 −0 404.jade
  2. +1 −1 app.js
View
@@ -0,0 +1,3 @@
+link(href="/css/index.css", rel="stylesheet")
+
+p Sorry! that link doesn't exist.
View
2 app.js
@@ -211,7 +211,7 @@ module.exports = (function (port, secure) {
app.get('/:short', function (req, res, next) {
redis.hget('urls', req.params.short, function (err, val) {
if (err) return next(err);
- if (!val) return next();
+ if (!val) return res.render('404');
redis.lpush('transactions', JSON.stringify({
type: 'url visited'

0 comments on commit ad34d73

Please sign in to comment.