mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-03 12:36:02 +01:00
Merge branch 'master' of github.com:psychobunny/node-forum
This commit is contained in:
@@ -154,26 +154,46 @@ var express = require('express'),
|
||||
break;
|
||||
case 'topic' :
|
||||
posts.get(function(data) {
|
||||
if(!data) {
|
||||
res.send(false);
|
||||
return;
|
||||
}
|
||||
res.send(JSON.stringify(data));
|
||||
}, req.params.id, (req.user) ? req.user.uid : 0);
|
||||
break;
|
||||
case 'category' :
|
||||
topics.get(function(data) {
|
||||
if(!data) {
|
||||
res.send(false);
|
||||
return;
|
||||
}
|
||||
res.send(JSON.stringify(data));
|
||||
}, req.params.id, (req.user) ? req.user.uid : 0);
|
||||
break;
|
||||
case 'latest' :
|
||||
topics.get(function(data) {
|
||||
if(!data) {
|
||||
res.send(false);
|
||||
return;
|
||||
}
|
||||
res.send(JSON.stringify(data));
|
||||
});
|
||||
break;
|
||||
case 'popular' :
|
||||
topics.get(function(data) {
|
||||
if(!data) {
|
||||
res.send(false);
|
||||
return;
|
||||
}
|
||||
res.send(JSON.stringify(data));
|
||||
});
|
||||
break;
|
||||
case 'active' :
|
||||
topics.get(function(data) {
|
||||
if(!data) {
|
||||
res.send(false);
|
||||
return;
|
||||
}
|
||||
res.send(JSON.stringify(data));
|
||||
});
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user