Changed: StorageResultType to error result code

This commit is contained in:
djmaze 2021-03-16 09:46:23 +01:00
parent be3ef15f8e
commit 4a8d516123
33 changed files with 257 additions and 302 deletions

View file

@ -1,6 +1,5 @@
import ko from 'ko';
import Remote from 'Remote/Admin/Fetch';
import { StorageResultType } from 'Common/Enums';
export const DomainAdminStore = ko.observableArray();
@ -8,9 +7,9 @@ DomainAdminStore.loading = ko.observable(false);
DomainAdminStore.fetch = () => {
DomainAdminStore.loading(true);
Remote.domainList((result, data) => {
Remote.domainList((iError, data) => {
DomainAdminStore.loading(false);
if (StorageResultType.Success === result && data && data.Result) {
if (!iError && data && data.Result) {
DomainAdminStore(
Object.entries(data.Result).map(([name, [enabled, alias]]) => ({
name: name,