Assets routes should be parsed after server routes so /add-to-collection URL will work

This commit is contained in:
Andrew Nicolaou 2019-09-09 18:54:16 +02:00
parent c575559272
commit ee896b06ec

View file

@ -113,11 +113,12 @@ app.get(
passport.authenticate('basic', { session: false }), (req, res) => res.json(req.user) passport.authenticate('basic', { session: false }), (req, res) => res.json(req.user)
); );
app.use(assetRoutes);
// this is supposed to be TEMPORARY -- until i figure out // this is supposed to be TEMPORARY -- until i figure out
// isomorphic rendering // isomorphic rendering
app.use('/', serverRoutes); app.use('/', serverRoutes);
app.use(assetRoutes);
app.use('/', embedRoutes); app.use('/', embedRoutes);
app.get('/auth/github', passport.authenticate('github')); app.get('/auth/github', passport.authenticate('github'));
app.get('/auth/github/callback', passport.authenticate('github', { failureRedirect: '/login' }), (req, res) => { app.get('/auth/github/callback', passport.authenticate('github', { failureRedirect: '/login' }), (req, res) => {