return topics tags

v1.18.x
barisusakli
parent 87fe5bf1bb
commit 3f43db090b

@ -127,7 +127,7 @@
}, },
removePunctuation: function(str) { removePunctuation: function(str) {
return str.replace(/[\.,-\/#!$%\^&\*;:{}=\-_`~()?]/g, ''); return str.replace(/[\.,-\/#!$%\^&\*;:{}=\-_`<>'"~()?]/g, '');
}, },
isEmailValid: function(email) { isEmailValid: function(email) {

@ -211,6 +211,9 @@ var async = require('async'),
return next(null, userCache[topicData.uid]); return next(null, userCache[topicData.uid]);
} }
user.getUserFields(topicData.uid, ['username', 'userslug', 'picture'], next); user.getUserFields(topicData.uid, ['username', 'userslug', 'picture'], next);
},
tags: function(next) {
Topics.getTopicTagsObjects(topicData.tid, next);
} }
}, function(err, topicInfo) { }, function(err, topicInfo) {
if(err) { if(err) {
@ -234,6 +237,7 @@ var async = require('async'),
topicData.category = topicInfo.categoryData; topicData.category = topicInfo.categoryData;
topicData.teaser = topicInfo.teaser; topicData.teaser = topicInfo.teaser;
topicData.user = topicInfo.user; topicData.user = topicInfo.user;
topicData.tags = topicInfo.tags;
next(null, topicData); next(null, topicData);
}); });

Loading…
Cancel
Save