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 PluginAdminStore = ko.observableArray();
@ -10,9 +9,9 @@ PluginAdminStore.error = ko.observable('');
PluginAdminStore.fetch = () => {
PluginAdminStore.loading(true);
Remote.pluginList((result, data) => {
Remote.pluginList((iError, data) => {
PluginAdminStore.loading(false);
if (StorageResultType.Success === result && data && data.Result) {
if (!iError && data && data.Result) {
PluginAdminStore(
data.Result.map(item => ({
name: item.Name,