moved api route to api.js

v1.18.x
barisusakli 9 years ago
parent 7b84696c7f
commit 1dcdba9b2a

@ -2,8 +2,6 @@
var express = require('express'),
posts = require('../posts'),
categories = require('../categories'),
uploadsController = require('../controllers/uploads');
module.exports = function(app, middleware, controllers) {
@ -22,6 +20,7 @@ module.exports = function(app, middleware, controllers) {
router.get('/categories/:cid/moderators', controllers.api.getModerators);
router.get('/recent/posts/:term?', controllers.api.getRecentPosts);
router.get('/unread/total', middleware.authenticate, controllers.unread.unreadTotal);
router.get('/topic/teaser/:topic_id', controllers.topics.teaser);
var multipart = require('connect-multiparty');
var multipartMiddleware = multipart();

@ -36,8 +36,6 @@ function mainRoutes(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, [], controllers.topics.get);
}

Loading…
Cancel
Save