|
|
|
@ -40,8 +40,8 @@ function staticRoutes(app, middleware, controllers) {
|
|
|
|
|
function topicRoutes(app, middleware, controllers) {
|
|
|
|
|
app.get('/api/topic/teaser/:topic_id', controllers.topics.teaser);
|
|
|
|
|
|
|
|
|
|
setupPageRoute(app, '/topic/:topic_id/:slug/:post_index?', middleware, [], controllers.topics.get);
|
|
|
|
|
setupPageRoute(app, '/topic/:topic_id/:slug?', middleware, [middleware.addSlug], controllers.topics.get);
|
|
|
|
|
setupPageRoute(app, '/topic/:topic_id/:slug/:post_index?', middleware, [middleware.buildBreadcrumbs], controllers.topics.get);
|
|
|
|
|
setupPageRoute(app, '/topic/:topic_id/:slug?', middleware, [middleware.buildBreadcrumbs, middleware.addSlug], controllers.topics.get);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function tagRoutes(app, middleware, controllers) {
|
|
|
|
@ -55,8 +55,8 @@ function categoryRoutes(app, middleware, controllers) {
|
|
|
|
|
setupPageRoute(app, '/unread', middleware, [middleware.authenticate], controllers.categories.unread);
|
|
|
|
|
app.get('/api/unread/total', middleware.authenticate, controllers.categories.unreadTotal);
|
|
|
|
|
|
|
|
|
|
setupPageRoute(app, '/category/:category_id/:slug/:topic_index', middleware, [], controllers.categories.get);
|
|
|
|
|
setupPageRoute(app, '/category/:category_id/:slug?', middleware, [middleware.addSlug], controllers.categories.get);
|
|
|
|
|
setupPageRoute(app, '/category/:category_id/:slug/:topic_index', middleware, [middleware.buildBreadcrumbs], controllers.categories.get);
|
|
|
|
|
setupPageRoute(app, '/category/:category_id/:slug?', middleware, [middleware.buildBreadcrumbs, middleware.addSlug], controllers.categories.get);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function accountRoutes(app, middleware, controllers) {
|
|
|
|
|