Add flavor to overworld.

This commit is contained in:
Rob 2015-11-17 11:27:08 -08:00
parent 7f3426cc09
commit 7a86f754df
2 changed files with 3 additions and 3 deletions

View file

@ -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']

View file

@ -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 = {}