|
|
@ -15,7 +15,7 @@ var utils = require('../public/src/utils');
|
|
|
|
var _ = require('underscore');
|
|
|
|
var _ = require('underscore');
|
|
|
|
var S = require('string');
|
|
|
|
var S = require('string');
|
|
|
|
|
|
|
|
|
|
|
|
var Flags = {};
|
|
|
|
var Flags = module.exports;
|
|
|
|
|
|
|
|
|
|
|
|
Flags.get = function (flagId, callback) {
|
|
|
|
Flags.get = function (flagId, callback) {
|
|
|
|
async.waterfall([
|
|
|
|
async.waterfall([
|
|
|
@ -26,6 +26,9 @@ Flags.get = function (flagId, callback) {
|
|
|
|
notes: async.apply(Flags.getNotes, flagId),
|
|
|
|
notes: async.apply(Flags.getNotes, flagId),
|
|
|
|
}),
|
|
|
|
}),
|
|
|
|
function (data, next) {
|
|
|
|
function (data, next) {
|
|
|
|
|
|
|
|
if (!data.base) {
|
|
|
|
|
|
|
|
return callback();
|
|
|
|
|
|
|
|
}
|
|
|
|
// Second stage
|
|
|
|
// Second stage
|
|
|
|
async.parallel({
|
|
|
|
async.parallel({
|
|
|
|
userObj: async.apply(user.getUserFields, data.base.uid, ['username', 'userslug', 'picture']),
|
|
|
|
userObj: async.apply(user.getUserFields, data.base.uid, ['username', 'userslug', 'picture']),
|
|
|
|