mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-02 14:07:04 +03:00
Changed: StorageResultType to error result code
This commit is contained in:
parent
be3ef15f8e
commit
4a8d516123
33 changed files with 257 additions and 302 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import ko from 'ko';
|
||||
|
||||
import { StorageResultType, Notification } from 'Common/Enums';
|
||||
import { Notification } from 'Common/Enums';
|
||||
import { getNotification } from 'Common/Translator';
|
||||
|
||||
import { PackageAdminStore } from 'Stores/Admin/Package';
|
||||
|
|
@ -34,8 +34,8 @@ export class PackagesAdminSettings {
|
|||
}
|
||||
|
||||
requestHelper(packageToRequest, install) {
|
||||
return (result, data) => {
|
||||
if (StorageResultType.Success !== result || !data || !data.Result) {
|
||||
return (iError, data) => {
|
||||
if (iError || !data || !data.Result) {
|
||||
if (data && data.ErrorCode) {
|
||||
this.packagesError(getNotification(data.ErrorCode));
|
||||
} else {
|
||||
|
|
@ -52,7 +52,7 @@ export class PackagesAdminSettings {
|
|||
}
|
||||
});
|
||||
|
||||
if (StorageResultType.Success === result && data && data.Result && data.Result.Reload) {
|
||||
if (!iError && data && data.Result && data.Result.Reload) {
|
||||
location.reload();
|
||||
} else {
|
||||
PackageAdminStore.fetch();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue