mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-24 21:51:41 +08:00
The AdminPlugin JS model uses a similar pattern to chat models, where it is a plain JS class manually converting provided snake_case attributes from the serializer to JS camelCase. However this doesn't work when it comes to using `add_to_serializer` in plugins since core does not know about these new attributes. Instead, we can use a JS function to convert snake_case to camelCase and use that when initializing AdminPlugin. This commit also moves similar functions to a new case-converter.js file in discourse-common/lib. |
||
|---|---|---|
| .. | ||
| addon | ||
| app | ||
| .npmrc | ||
| ember-cli-build.js | ||
| index.js | ||
| package.json | ||