mirror of
https://github.com/flarum/framework.git
synced 2025-05-23 15:19:56 +08:00
Simplify model registration
This commit is contained in:
@ -55,10 +55,6 @@ export default class Store {
|
||||
return data ? Object.keys(data).map(id => data[id]) : [];
|
||||
}
|
||||
|
||||
model(type, Model) {
|
||||
this.models[type] = Model;
|
||||
}
|
||||
|
||||
createRecord(type, data) {
|
||||
data = data || {};
|
||||
data.type = data.type || type;
|
||||
|
Reference in New Issue
Block a user