From 7c7e16ea62847fcd4a8b35bfa19f7ff66745c584 Mon Sep 17 00:00:00 2001 From: Shawn Date: Fri, 9 Nov 2018 23:23:39 -0500 Subject: [PATCH] Change ambiguous routes, more distinct POST/login to POST/auth --- client/src/containers/ChannelLoginForm/view.jsx | 2 +- server/routes/auth/index.js | 2 +- server/routes/index.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/containers/ChannelLoginForm/view.jsx b/client/src/containers/ChannelLoginForm/view.jsx index 54dd8ad2..f033bd42 100644 --- a/client/src/containers/ChannelLoginForm/view.jsx +++ b/client/src/containers/ChannelLoginForm/view.jsx @@ -31,7 +31,7 @@ class ChannelLoginForm extends React.Component { }), credentials: 'include', }; - request('login', params) + request('auth', params) .then(({success, channelName, shortChannelId, channelClaimId, message}) => { if (success) { this.props.onChannelLogin(channelName, shortChannelId, channelClaimId); diff --git a/server/routes/auth/index.js b/server/routes/auth/index.js index 8bdbe1b6..dfe505d6 100644 --- a/server/routes/auth/index.js +++ b/server/routes/auth/index.js @@ -6,7 +6,7 @@ const handleUserRequest = require('../../controllers/auth/user'); module.exports = { '/signup': { method: 'post', controller: [ speechPassport.authenticate('local-signup'), handleSignupRequest ] }, - '/login': { method: 'post', controller: handleLoginRequest }, + '/auth': { method: 'post', controller: handleLoginRequest }, '/logout': { controller: handleLogoutRequest }, '/user': { controller: handleUserRequest }, }; diff --git a/server/routes/index.js b/server/routes/index.js index 5186467d..71223948 100644 --- a/server/routes/index.js +++ b/server/routes/index.js @@ -1,7 +1,7 @@ module.exports = { - ...require('./auth'), ...require('./pages'), ...require('./api'), + ...require('./auth'), ...require('./assets'), ...require('./fallback'), };