mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
Only fetch hero campaigns for overworld route
This commit is contained in:
parent
0d35f1472e
commit
ebc081d105
1 changed files with 1 additions and 1 deletions
|
@ -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) =>
|
||||||
|
|
Loading…
Reference in a new issue