renamed auth route
This commit is contained in:
parent
88db2c1cf4
commit
a997a44a23
|
@ -77,7 +77,7 @@ module.exports = function() {
|
|||
app.route('/error', body(require('../pages/error')));
|
||||
app.route('/blank', body(require('../pages/blank')));
|
||||
app.route('/signin', body(require('../pages/signin')));
|
||||
app.route('/api/fxa/oauth', async function(state, emit) {
|
||||
app.route('/oauth', async function(state, emit) {
|
||||
try {
|
||||
await state.user.finishLogin(state.query.code, state.query.state);
|
||||
emit('replaceState', '/');
|
||||
|
|
|
@ -45,7 +45,7 @@ module.exports = function(app, devServer) {
|
|||
app.get('/completed', android);
|
||||
app.get('/preferences', android);
|
||||
app.get('/options', android);
|
||||
app.get('/api/fxa/oauth', android);
|
||||
app.get('/oauth', android);
|
||||
}
|
||||
routes(app);
|
||||
tests(app);
|
||||
|
|
|
@ -68,6 +68,7 @@ module.exports = function(app) {
|
|||
app.use(express.json());
|
||||
app.get('/', language, pages.index);
|
||||
app.get('/signin', pages.blank);
|
||||
app.get('/oauth', pages.blank);
|
||||
app.get('/legal', language, pages.legal);
|
||||
app.get('/jsconfig.js', require('./jsconfig'));
|
||||
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/metadata/:id${ID_REGEX}`, auth.hmac, require('./metadata'));
|
||||
app.get('/api/fxa/oauth', pages.blank);
|
||||
app.get('/api/filelist', auth.fxa, filelist.get);
|
||||
app.post('/api/filelist', auth.fxa, filelist.post);
|
||||
app.post('/api/upload', auth.fxa, require('./upload'));
|
||||
|
|
Loading…
Reference in New Issue