started working on threadss, implemented slug url, fixed crashing bug during post creation

This commit is contained in:
psychobunny
2013-04-25 21:55:11 +00:00
parent a085b7eb0a
commit 98ca14e31c
6 changed files with 62 additions and 34 deletions

View File

@@ -60,6 +60,19 @@ var express = require('express'),
});
});
app.get('/topics/:topic_id', function(req, res) {
global.modules.topics.generate_topic_body(function(topic_body) {
res.send(templates['header'] + topic_body + templates['footer']);
}, req.params.topic_id)
});
app.get('/topics/:topic_id/:slug', function(req, res) {
global.modules.topics.generate_topic_body(function(topic_body) {
res.send(templates['header'] + topic_body + templates['footer']);
}, req.params.topic_id)
});
app.get('/api/:method', function(req, res) {
switch(req.params.method) {
case 'home' :