es que eran tan pocos, que daba lo mismo y simplificaba la programación


On Thu, Jan 23, 2014 at 11:31 PM, arturokunder <notifications@github.com>wrote:

> In routes/api/campaign.js:
>
> > @@ -5,12 +5,22 @@ exports.get = function (req, res) {
> >    var param = (JSON.stringify(req.query) === JSON.stringify({}) ? req.body : req.query);
> >    var campaignMongoose;
> >    if (param.campaign && !req.user.isSuperAdmin) {
> > -    campaignMongoose = model.Campaign.find({_id: param.campaign, company: req.user.company._id});
> > -  } else if (param.campaign && req.user.isSuperAdmin) {
> > +    campaignMongoose = model.Campaign.find({
> > +      _id: param.campaign,
> > +      company: req.user.company._id,
> > +      'status.isDelete' : false
>
> Mm...y no es mejor que te las esconda la query para no estar mandando
> información extra? Arturo Tagle
> … <#143c216c24dbe311_>
> On 23-01-2014, at 22:36, "Pedro" <notifications@github.com> wrote: In
> routes/api/campaign.js: > @@ -5,12 +5,22 @@ exports.get = function (req,
> res) { > var param = (JSON.stringify(req.query) === JSON.stringify({}) ?
> req.body : req.query); > var campaignMongoose; > if (param.campaign &&
> !req.user.isSuperAdmin) { > - campaignMongoose = model.Campaign.find({_id:
> param.campaign, company: req.user.company._id}); > - } else if
> (param.campaign && req.user.isSuperAdmin) { > + campaignMongoose =
> model.Campaign.find({ > + _id: param.campaign, > + company:
> req.user.company._id, > + 'status.isDelete' : false Ah si, estaba hecho
> así, siempre te manda todas las campañas, la idea es que por frontend las
> escondas — Reply to this email directly or view it on GitHub.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/pcortez/kd-twitter/pull/212/files#r9138780>
> .
>