REFACTOR: Remove `Discourse.TrustLevel` constant
This commit is contained in:
parent
f8d69253e8
commit
9d457fa51f
|
@ -49,6 +49,7 @@
|
|||
//= require ./discourse/models/permission-type
|
||||
//= require ./discourse/models/user-action-group
|
||||
//= require ./discourse/models/input-validation
|
||||
//= require ./discourse/models/trust-level
|
||||
//= require ./discourse/lib/search
|
||||
//= require ./discourse/lib/user-search
|
||||
//= require ./discourse/lib/export-csv
|
||||
|
|
|
@ -7,6 +7,7 @@ import Archetype from "discourse/models/archetype";
|
|||
import PostActionType from "discourse/models/post-action-type";
|
||||
import Singleton from "discourse/mixins/singleton";
|
||||
import RestModel from "discourse/models/rest";
|
||||
import TrustLevel from "discourse/models/trust-level";
|
||||
import PreloadStore from "preload-store";
|
||||
|
||||
const Site = RestModel.extend({
|
||||
|
@ -176,9 +177,7 @@ Site.reopenClass(Singleton, {
|
|||
}
|
||||
|
||||
if (result.trust_levels) {
|
||||
result.trustLevels = result.trust_levels.map(tl =>
|
||||
Discourse.TrustLevel.create(tl)
|
||||
);
|
||||
result.trustLevels = result.trust_levels.map(tl => TrustLevel.create(tl));
|
||||
delete result.trust_levels;
|
||||
}
|
||||
|
||||
|
|
|
@ -89,7 +89,6 @@ JS
|
|||
"discourse/models/user-action",
|
||||
"discourse/routes/discourse",
|
||||
"discourse/models/category",
|
||||
"discourse/models/trust-level",
|
||||
"discourse/models/site",
|
||||
"discourse/models/user",
|
||||
"discourse/models/session",
|
||||
|
|
Loading…
Reference in New Issue