From d30f5a7af60d6b1dfac16ea61d7d8b6715446e29 Mon Sep 17 00:00:00 2001 From: TheDiaval Date: Tue, 24 Dec 2019 11:39:20 +0300 Subject: [PATCH] refactor(core): change state service dispatcher parameters --- .../core/src/lib/services/config-state.service.ts | 8 ++++---- .../core/src/lib/services/profile-state.service.ts | 8 ++++---- .../core/src/lib/services/session-state.service.ts | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/npm/ng-packs/packages/core/src/lib/services/config-state.service.ts b/npm/ng-packs/packages/core/src/lib/services/config-state.service.ts index 4d555c72fd..506b278634 100644 --- a/npm/ng-packs/packages/core/src/lib/services/config-state.service.ts +++ b/npm/ng-packs/packages/core/src/lib/services/config-state.service.ts @@ -54,11 +54,11 @@ export class ConfigStateService { return this.store.dispatch(new GetAppConfiguration()); } - dispatchPatchRouteByName(name: string, newValue: Partial) { - return this.store.dispatch(new PatchRouteByName(name, newValue)); + dispatchPatchRouteByName(...args: ConstructorParameters) { + return this.store.dispatch(new PatchRouteByName(...args)); } - dispatchAddRoute(payload: Omit) { - return this.store.dispatch(new AddRoute(payload)); + dispatchAddRoute(...args: ConstructorParameters) { + return this.store.dispatch(new AddRoute(...args)); } } diff --git a/npm/ng-packs/packages/core/src/lib/services/profile-state.service.ts b/npm/ng-packs/packages/core/src/lib/services/profile-state.service.ts index 9c7567e11f..cd76c4bf03 100644 --- a/npm/ng-packs/packages/core/src/lib/services/profile-state.service.ts +++ b/npm/ng-packs/packages/core/src/lib/services/profile-state.service.ts @@ -18,11 +18,11 @@ export class ProfileStateService { return this.store.dispatch(new GetProfile()); } - dispatchUpdateProfile(payload: Profile.Response) { - return this.store.dispatch(new UpdateProfile(payload)); + dispatchUpdateProfile(...args: ConstructorParameters) { + return this.store.dispatch(new UpdateProfile(...args)); } - dispatchChangePassword(payload: Profile.ChangePasswordRequest) { - return this.store.dispatch(new ChangePassword(payload)); + dispatchChangePassword(...args: ConstructorParameters) { + return this.store.dispatch(new ChangePassword(...args)); } } diff --git a/npm/ng-packs/packages/core/src/lib/services/session-state.service.ts b/npm/ng-packs/packages/core/src/lib/services/session-state.service.ts index ccb1de9a12..88b8f2df9b 100644 --- a/npm/ng-packs/packages/core/src/lib/services/session-state.service.ts +++ b/npm/ng-packs/packages/core/src/lib/services/session-state.service.ts @@ -18,11 +18,11 @@ export class SessionStateService { return this.store.selectSnapshot(SessionState.getTenant); } - dispatchSetLanguage(payload: string) { - return this.store.dispatch(new SetLanguage(payload)); + dispatchSetLanguage(...args: ConstructorParameters) { + return this.store.dispatch(new SetLanguage(...args)); } - dispatchSetTenant(payload: ABP.BasicItem) { - return this.store.dispatch(new SetTenant(payload)); + dispatchSetTenant(...args: ConstructorParameters) { + return this.store.dispatch(new SetTenant(...args)); } }