Only fetch hero campaigns for overworld route

This commit is contained in:
Nick Winter 2015-11-23 12:38:51 -08:00
parent 0d35f1472e
commit ebc081d105

View file

@ -57,7 +57,7 @@ CampaignHandler = class CampaignHandler extends Handler
projection = {} projection = {}
if req.query.project if req.query.project
projection[field] = 1 for field in req.query.project.split(',') projection[field] = 1 for field in req.query.project.split(',')
q = @modelClass.find {}, projection q = @modelClass.find {type: 'hero'}, projection
q.exec (err, documents) => q.exec (err, documents) =>
return @sendDatabaseError(res, err) if err return @sendDatabaseError(res, err) if err
formatCampaign = (doc) => formatCampaign = (doc) =>