renamed auth route

This commit is contained in:
Danny Coates 2018-09-26 12:22:04 -07:00
parent 88db2c1cf4
commit a997a44a23
No known key found for this signature in database
GPG Key ID: 4C442633C62E00CB
3 changed files with 3 additions and 3 deletions

View File

@ -77,7 +77,7 @@ module.exports = function() {
app.route('/error', body(require('../pages/error'))); app.route('/error', body(require('../pages/error')));
app.route('/blank', body(require('../pages/blank'))); app.route('/blank', body(require('../pages/blank')));
app.route('/signin', body(require('../pages/signin'))); app.route('/signin', body(require('../pages/signin')));
app.route('/api/fxa/oauth', async function(state, emit) { app.route('/oauth', async function(state, emit) {
try { try {
await state.user.finishLogin(state.query.code, state.query.state); await state.user.finishLogin(state.query.code, state.query.state);
emit('replaceState', '/'); emit('replaceState', '/');

View File

@ -45,7 +45,7 @@ module.exports = function(app, devServer) {
app.get('/completed', android); app.get('/completed', android);
app.get('/preferences', android); app.get('/preferences', android);
app.get('/options', android); app.get('/options', android);
app.get('/api/fxa/oauth', android); app.get('/oauth', android);
} }
routes(app); routes(app);
tests(app); tests(app);

View File

@ -68,6 +68,7 @@ module.exports = function(app) {
app.use(express.json()); app.use(express.json());
app.get('/', language, pages.index); app.get('/', language, pages.index);
app.get('/signin', pages.blank); app.get('/signin', pages.blank);
app.get('/oauth', pages.blank);
app.get('/legal', language, pages.legal); app.get('/legal', language, pages.legal);
app.get('/jsconfig.js', require('./jsconfig')); app.get('/jsconfig.js', require('./jsconfig'));
app.get(`/share/:id${ID_REGEX}`, language, pages.blank); app.get(`/share/:id${ID_REGEX}`, language, pages.blank);
@ -82,7 +83,6 @@ module.exports = function(app) {
); );
app.get(`/api/exists/:id${ID_REGEX}`, require('./exists')); app.get(`/api/exists/:id${ID_REGEX}`, require('./exists'));
app.get(`/api/metadata/:id${ID_REGEX}`, auth.hmac, require('./metadata')); app.get(`/api/metadata/:id${ID_REGEX}`, auth.hmac, require('./metadata'));
app.get('/api/fxa/oauth', pages.blank);
app.get('/api/filelist', auth.fxa, filelist.get); app.get('/api/filelist', auth.fxa, filelist.get);
app.post('/api/filelist', auth.fxa, filelist.post); app.post('/api/filelist', auth.fxa, filelist.post);
app.post('/api/upload', auth.fxa, require('./upload')); app.post('/api/upload', auth.fxa, require('./upload'));