Node.js based forum software built for the modern web
more fixes
Baris Usakli82319a020f73
diff --git a/src/topics.js b/src/topics.jsindex a33cea7ea9..6714843296 100644--- a/src/topics.js+++ b/src/topics.js@@ -83,7 +83,7 @@ marked.setOptions({});}- Topics.getTopicById = function(tid, current_user, callback) {+ Topics.getTopicWithPosts = function(tid, current_user, callback) {Topics.markAsRead(tid, current_user);diff --git a/src/webserver.js b/src/webserver.jsindex 197d863737..a0e5f3e5a8 100644--- a/src/webserver.js+++ b/src/webserver.js@@ -134,7 +134,7 @@ var express = require('express'),var topic_url = tid + (req.params.slug ? '/' + req.params.slug : '');- topics.getTopicById(tid, ((req.user) ? req.user.uid : 0), function(topic) {+ topics.getTopicWithPosts(tid, ((req.user) ? req.user.uid : 0), function(topic) {res.send(app.build_header(res) +'\n\t<noscript>\n' + templates['noscript/header'] + templates['noscript/topic'].parse(topic) + '\n\t</noscript>' +@@ -241,7 +241,7 @@ var express = require('express'),res.json(data);break;case 'topic' :- topics.getTopicById(req.params.id, uid, function(data) {+ topics.getTopicWithPosts(req.params.id, uid, function(data) {res.json(data);});break;@@ -314,9 +314,6 @@ var express = require('express'),app.all('/test', function(req, res) {- /*topics.getTopicById(24, 1, function(data) {- res.send(data);- });*/categories.getCategoryById(1,1, function(data) {res.send(data);},1);