mirror of
https://github.com/flarum/core.git
synced 2025-08-01 06:00:24 +02:00
Finish admin permissions page and clean up everything
This commit is contained in:
@@ -189,9 +189,10 @@ export default class Model {
|
||||
method: 'DELETE',
|
||||
url: app.forum.attribute('apiUrl') + this.apiEndpoint(),
|
||||
data
|
||||
}).then(
|
||||
() => this.exists = false
|
||||
);
|
||||
}).then(() => {
|
||||
this.exists = false;
|
||||
this.store.remove(this);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -214,7 +215,7 @@ export default class Model {
|
||||
*/
|
||||
static attribute(name, transform) {
|
||||
return function() {
|
||||
const value = this.data.attributes[name];
|
||||
const value = this.data.attributes && this.data.attributes[name];
|
||||
|
||||
return transform ? transform(value) : value;
|
||||
};
|
||||
|
Reference in New Issue
Block a user