Improved cache handling

This commit is contained in:
the-djmaze 2023-01-09 12:28:07 +01:00
parent 29854311f9
commit cf12960507
12 changed files with 153 additions and 145 deletions

View file

@ -210,7 +210,15 @@ export class DomainPopupView extends AbstractViewPopup {
createOrAddCommand() {
this.saving(true);
Remote.request('AdminDomainSave',
this.onDomainCreateOrSaveResponse.bind(this),
iError => {
this.saving(false);
if (iError) {
this.savingError(getNotification(iError));
} else {
DomainAdminStore.fetch();
this.close();
}
},
Object.assign(domainToParams(this), {
Create: this.edit() ? 0 : 1
})
@ -263,16 +271,6 @@ export class DomainPopupView extends AbstractViewPopup {
});
}
onDomainCreateOrSaveResponse(iError) {
this.saving(false);
if (iError) {
this.savingError(getNotification(iError));
} else {
DomainAdminStore.fetch();
this.close();
}
}
clearTesting() {
this.testing(false);
this.testingDone(false);