From 003bd0ff5431ee62458a9bddba929fe457fa11b6 Mon Sep 17 00:00:00 2001 From: Kayne Ruse Date: Fri, 17 May 2019 16:41:18 +1000 Subject: [PATCH] Fixed a minor bug --- server/profiles.js | 2 +- src/components/pages/profile.jsx | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/server/profiles.js b/server/profiles.js index 2fe104f..e4d9ec4 100644 --- a/server/profiles.js +++ b/server/profiles.js @@ -82,7 +82,7 @@ function profileRequestInner(connection, req, res, fields) { if (results.length === 1) { return profileCreateInner(connection, req, res, fields); } else { - res.status(404).write('Profile not found'); + res.status(400).write('Profile not found'); res.end(); } }); diff --git a/src/components/pages/profile.jsx b/src/components/pages/profile.jsx index 068196e..61d14c8 100644 --- a/src/components/pages/profile.jsx +++ b/src/components/pages/profile.jsx @@ -121,9 +121,6 @@ class Profile extends React.Component { else if (xhr.status === 400) { this.setWarning(xhr.responseText); } - else if (xhr.status === 404) { - this.props.history.push('/404'); - } } }