mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 23:58:02 -05:00
Made Achievements and Campaigns patchable.
This commit is contained in:
parent
eafecaf492
commit
f9ee100e73
5 changed files with 5 additions and 1 deletions
|
@ -91,5 +91,6 @@ AchievementSchema.definitions = {}
|
|||
AchievementSchema.definitions['mongoQueryOperator'] = MongoQueryOperatorSchema
|
||||
AchievementSchema.definitions['mongoFindQuery'] = MongoFindQuerySchema
|
||||
c.extendTranslationCoverageProperties AchievementSchema
|
||||
c.extendPatchableProperties AchievementSchema
|
||||
|
||||
module.exports = AchievementSchema
|
||||
|
|
|
@ -124,5 +124,6 @@ _.extend CampaignSchema.properties, {
|
|||
|
||||
c.extendBasicProperties CampaignSchema, 'campaign'
|
||||
c.extendTranslationCoverageProperties CampaignSchema
|
||||
c.extendPatchableProperties CampaignSchema
|
||||
|
||||
module.exports = CampaignSchema
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
c = require './../schemas'
|
||||
|
||||
patchables = ['level', 'thang_type', 'level_system', 'level_component', 'article', 'achievement']
|
||||
patchables = ['level', 'thang_type', 'level_system', 'level_component', 'article', 'achievement', 'campaign']
|
||||
|
||||
PatchSchema = c.object({title: 'Patch', required: ['target', 'delta', 'commitMessage']}, {
|
||||
delta: {title: 'Delta', type: ['array', 'object']}
|
||||
|
|
|
@ -81,6 +81,7 @@ AchievementSchema.post 'save', -> @constructor.loadAchievements()
|
|||
AchievementSchema.plugin(plugins.NamedPlugin)
|
||||
AchievementSchema.plugin(plugins.SearchablePlugin, {searchable: ['name']})
|
||||
AchievementSchema.plugin plugins.TranslationCoveragePlugin
|
||||
AchievementSchema.plugin plugins.PatchablePlugin
|
||||
|
||||
module.exports = Achievement = mongoose.model('Achievement', AchievementSchema, 'achievements')
|
||||
|
||||
|
|
|
@ -8,5 +8,6 @@ CampaignSchema.index({slug: 1}, {name: 'slug index', sparse: true, unique: true}
|
|||
|
||||
CampaignSchema.plugin(plugins.NamedPlugin)
|
||||
CampaignSchema.plugin(plugins.TranslationCoveragePlugin)
|
||||
CampaignSchema.plugin plugins.PatchablePlugin
|
||||
|
||||
module.exports = mongoose.model('campaign', CampaignSchema)
|
||||
|
|
Loading…
Reference in a new issue