mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 09:35:39 -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"
|
||||
|
||||
class CampaignsCollection extends CocoCollection
|
||||
url: '/db/campaign/-/overview'
|
||||
url: '/db/campaign/-/overworld'
|
||||
model: Campaign
|
||||
project: ['name', 'fullName', 'description', 'i18n']
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ CampaignHandler = class CampaignHandler extends Handler
|
|||
documents = (@formatEntity(req, doc) for doc in documents)
|
||||
@sendSuccess(res, documents)
|
||||
|
||||
getOverview: (req, res) ->
|
||||
getOverworld: (req, res) ->
|
||||
return @sendForbiddenError(res) if not @hasAccess(req)
|
||||
q = @modelClass.find {}, slug: 1, adjacentCampaigns: 1, fullName: 1, description: 1, color: 1
|
||||
q.exec (err, documents) =>
|
||||
|
@ -66,7 +66,7 @@ CampaignHandler = class CampaignHandler extends Handler
|
|||
|
||||
getByRelationship: (req, res, args...) ->
|
||||
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']
|
||||
projection = {}
|
||||
|
|
Loading…
Reference in a new issue