spee.ch/server/routes/pages/index.js

22 lines
1.3 KiB
JavaScript
Raw Normal View History

const handlePageRequest = require('../../controllers/pages/sendReactApp');
2018-06-26 04:04:17 +02:00
const handleVideoEmbedRequest = require('../../controllers/pages/sendVideoEmbedPage');
const redirect = require('../../controllers/utils/redirect');
2018-03-29 18:48:32 +02:00
// TODO: Adjust build & sources to use import/export everywhere
const Actions = require('@actions').default;
const Sagas = require('@sagas').default;
module.exports = {
2018-11-11 01:11:12 +01:00
'/' : { controller: handlePageRequest, action: Actions.onHandleShowHomepage, saga: Sagas.handleShowHomepage },
'/login' : { controller: handlePageRequest },
'/about' : { controller: handlePageRequest },
'/tos' : { controller: handlePageRequest },
'/faq' : { controller: handlePageRequest },
'/trending' : { controller: redirect('/popular') },
'/popular' : { controller: handlePageRequest },
'/new' : { controller: handlePageRequest },
'/edit/:claimId' : { controller: handlePageRequest },
'/multisite' : { controller: handlePageRequest },
2018-11-02 09:45:35 +01:00
'/video-embed/:name/:claimId/:config?': { controller: handleVideoEmbedRequest }, // for twitter
2018-03-29 18:48:32 +02:00
};