1
0
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:
Toby Zerner
2015-07-31 20:16:47 +09:30
parent 5706c71c86
commit fde7afd3e2
33 changed files with 766 additions and 291 deletions

View File

@@ -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;
};