|
|
|
@ -1,8 +1,8 @@
|
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
|
|
var async = require('async'),
|
|
|
|
|
posts = require('../posts'),
|
|
|
|
|
db = require('../database');
|
|
|
|
|
var async = require('async');
|
|
|
|
|
var posts = require('../posts');
|
|
|
|
|
var db = require('../database');
|
|
|
|
|
|
|
|
|
|
module.exports = function(Categories) {
|
|
|
|
|
|
|
|
|
@ -18,7 +18,7 @@ module.exports = function(Categories) {
|
|
|
|
|
var uids = posts.map(function(post) {
|
|
|
|
|
return post.uid;
|
|
|
|
|
}).filter(function(uid, index, array) {
|
|
|
|
|
return parseInt(uid, 10) !== 0 && array.indexOf(uid) === index;
|
|
|
|
|
return parseInt(uid, 10) && array.indexOf(uid) === index;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
next(null, uids);
|
|
|
|
|