mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-02-25 05:54:51 -05:00
Add flavor to overworld.
This commit is contained in:
parent
7f3426cc09
commit
7a86f754df
2 changed files with 3 additions and 3 deletions
|
@ -33,7 +33,7 @@ class LevelSessionsCollection extends CocoCollection
|
||||||
@url = "/db/user/#{me.id}/level.sessions?project=state.complete,levelID,state.difficulty,playtime"
|
@url = "/db/user/#{me.id}/level.sessions?project=state.complete,levelID,state.difficulty,playtime"
|
||||||
|
|
||||||
class CampaignsCollection extends CocoCollection
|
class CampaignsCollection extends CocoCollection
|
||||||
url: '/db/campaign/-/overview'
|
url: '/db/campaign/-/overworld'
|
||||||
model: Campaign
|
model: Campaign
|
||||||
project: ['name', 'fullName', 'description', 'i18n']
|
project: ['name', 'fullName', 'description', 'i18n']
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ CampaignHandler = class CampaignHandler extends Handler
|
||||||
documents = (@formatEntity(req, doc) for doc in documents)
|
documents = (@formatEntity(req, doc) for doc in documents)
|
||||||
@sendSuccess(res, documents)
|
@sendSuccess(res, documents)
|
||||||
|
|
||||||
getOverview: (req, res) ->
|
getOverworld: (req, res) ->
|
||||||
return @sendForbiddenError(res) if not @hasAccess(req)
|
return @sendForbiddenError(res) if not @hasAccess(req)
|
||||||
q = @modelClass.find {}, slug: 1, adjacentCampaigns: 1, fullName: 1, description: 1, color: 1
|
q = @modelClass.find {}, slug: 1, adjacentCampaigns: 1, fullName: 1, description: 1, color: 1
|
||||||
q.exec (err, documents) =>
|
q.exec (err, documents) =>
|
||||||
|
@ -66,7 +66,7 @@ CampaignHandler = class CampaignHandler extends Handler
|
||||||
|
|
||||||
getByRelationship: (req, res, args...) ->
|
getByRelationship: (req, res, args...) ->
|
||||||
relationship = args[1]
|
relationship = args[1]
|
||||||
return @getOverview(req,res) if args[0] is '-' and relationship is 'overview'
|
return @getOverworld(req,res) if args[0] is '-' and relationship is 'overworld'
|
||||||
|
|
||||||
if relationship in ['levels', 'achievements']
|
if relationship in ['levels', 'achievements']
|
||||||
projection = {}
|
projection = {}
|
||||||
|
|
Loading…
Reference in a new issue