codecombat/server/models
Scott Erickson 7bab895dee Generalize new I18N view system
Previously, when diplomats submit translations, the system
would try to figure out whether it should be a 'patch' or a 'change',
and then would either create a patch for an admin or artisan to
review and accept or reject, or would apply the changes immediately
and they would be live. This was done as a compromise between
getting translations live quickly, but also preventing already-translated
text from getting overwritten without oversight.

But having the client handle this added logical complexity. So
this makes all diplomats submit patches, no matter what. The server
is then in charge of deciding if it should auto-accept the patch or not.
Either way, a patch is created.

There was also much refactoring. This commit includes:

* Update jsondiffpatch so changes within array items are handled correctly
* Refactor posting patches to use the new auto-accepting logic, and out of Patch model
* Refactor POST /db/patch/:handle/status so that it doesn't rely on handlers
* Refactor patch stat handling to ensure auto-accepted patches are counted
* Refactor User.incrementStat to use mongodb update commands, to avoid race conditions
* Refactor Patch tests
2016-09-09 10:59:26 -07:00
..
Achievement.coffee More achievement tweaks 2016-09-06 09:37:02 -07:00
AnalyticsLogEvent.coffee Display info when connected to analytics mongo like we do for LS and main. 2016-09-02 16:00:50 -07:00
AnalyticsPerDay.coffee Refactor server models into /server/models, remove request and mongoose from test globals 2016-04-06 16:06:52 -07:00
AnalyticsString.coffee Refactor server models into /server/models, remove request and mongoose from test globals 2016-04-06 16:06:52 -07:00
AnalyticsStripeInvoice.coffee Refactor server models into /server/models, remove request and mongoose from test globals 2016-04-06 16:06:52 -07:00
AnalyticsUsersActive.coffee Refactor server models into /server/models, remove request and mongoose from test globals 2016-04-06 16:06:52 -07:00
Article.coffee Refactor server models into /server/models, remove request and mongoose from test globals 2016-04-06 16:06:52 -07:00
Campaign.coffee Refactor post new level version handler, add failed save handling 2016-08-25 10:28:46 -07:00
Clan.coffee Refactor server models into /server/models, remove request and mongoose from test globals 2016-04-06 16:06:52 -07:00
Classroom.coffee Refactor post new level version handler, add failed save handling 2016-08-25 10:28:46 -07:00
CodeLog.coffee Refactor post new level version handler, add failed save handling 2016-08-25 10:28:46 -07:00
Course.coffee Generalize new I18N view system 2016-09-09 10:59:26 -07:00
CourseInstance.coffee Refactor server models into /server/models, remove request and mongoose from test globals 2016-04-06 16:06:52 -07:00
EarnedAchievement.coffee Fix EarnedAchievement.upsertFor to handle achievements that had no rewards 2016-09-08 10:32:59 -07:00
Level.coffee Generalize new I18N view system 2016-09-09 10:59:26 -07:00
LevelComponent.coffee Generalize new I18N view system 2016-09-09 10:59:26 -07:00
LevelFeedback.coffee Refactor server models into /server/models, remove request and mongoose from test globals 2016-04-06 16:06:52 -07:00
LevelSession.coffee Fix sending too much and not enough data on arena sessions 2016-08-23 16:02:03 -07:00
LevelSystem.coffee Generalize new I18N view system 2016-09-09 10:59:26 -07:00
LevelThangType.coffee Refactor server models into /server/models, remove request and mongoose from test globals 2016-04-06 16:06:52 -07:00
MailSent.coffee Refactor server models into /server/models, remove request and mongoose from test globals 2016-04-06 16:06:52 -07:00
Mandate.coffee Add Mandate for modifying simulation throughput on the fly, other things later 2015-12-16 16:39:45 -08:00
Patch.coffee Generalize new I18N view system 2016-09-09 10:59:26 -07:00
Payment.coffee Refactor server models into /server/models, remove request and mongoose from test globals 2016-04-06 16:06:52 -07:00
Poll.coffee Refactor server models into /server/models, remove request and mongoose from test globals 2016-04-06 16:06:52 -07:00
Prepaid.coffee Add Enrollment start/end dates, remove self-serve 2016-05-24 14:07:28 -07:00
Product.coffee Move product information to the db 2015-12-14 11:10:50 -08:00
Purchase.coffee Refactor server models into /server/models, remove request and mongoose from test globals 2016-04-06 16:06:52 -07:00
ScoringTask.coffee Refactor server models into /server/models, remove request and mongoose from test globals 2016-04-06 16:06:52 -07:00
ThangType.coffee Generalize new I18N view system 2016-09-09 10:59:26 -07:00
TrialRequest.coffee Send request licenses emails to Close.io sales contact 2016-05-25 16:03:08 -07:00
User.coffee Generalize new I18N view system 2016-09-09 10:59:26 -07:00
UserCodeProblem.coffee Refactor server models into /server/models, remove request and mongoose from test globals 2016-04-06 16:06:52 -07:00
UserPollsRecord.coffee Add checks to keep User purchased.gems from becoming NaN 2016-06-20 16:44:07 -07:00
UserRemark.coffee Refactor handlers to /server/handlers 2016-04-07 09:40:53 -07:00