From 38c0d7cf68a74bc7f2bcf8b43697a30b695e2066 Mon Sep 17 00:00:00 2001 From: dotch Date: Thu, 27 Nov 2014 14:07:02 +0100 Subject: [PATCH] fix: return a 404 when no user is found fixes #711 --- app/templates/server/api/user(auth)/user.controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/templates/server/api/user(auth)/user.controller.js b/app/templates/server/api/user(auth)/user.controller.js index 793da0255..8c25c85f6 100644 --- a/app/templates/server/api/user(auth)/user.controller.js +++ b/app/templates/server/api/user(auth)/user.controller.js @@ -64,7 +64,7 @@ exports.show = function(req, res, next) { User.findByIdAsync(userId) .then(function(user) { if (!user) { - return res.send(401); + return res.send(404); } res.json(user.profile); })