From 6f9422d8f254dccaa43fafc1eefe0b2d09b04619 Mon Sep 17 00:00:00 2001 From: TheDiaval Date: Tue, 24 Dec 2019 11:39:39 +0300 Subject: [PATCH] refactor(identity): change state service dispatcher parameters --- .../lib/services/identity-state.service.ts | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/npm/ng-packs/packages/identity/src/lib/services/identity-state.service.ts b/npm/ng-packs/packages/identity/src/lib/services/identity-state.service.ts index 91763a685f..0fcb6d4014 100644 --- a/npm/ng-packs/packages/identity/src/lib/services/identity-state.service.ts +++ b/npm/ng-packs/packages/identity/src/lib/services/identity-state.service.ts @@ -36,47 +36,47 @@ export class IdentityStateService { return this.store.selectSnapshot(IdentityState.getUsersTotalCount); } - dispatchGetRoles(payload?: ABP.PageQueryParams) { - return this.store.dispatch(new GetRoles(payload)); + dispatchGetRoles(...args: ConstructorParameters) { + return this.store.dispatch(new GetRoles(...args)); } - dispatchGetRoleById(payload: string) { - return this.store.dispatch(new GetRoleById(payload)); + dispatchGetRoleById(...args: ConstructorParameters) { + return this.store.dispatch(new GetRoleById(...args)); } - dispatchDeleteRole(payload: string) { - return this.store.dispatch(new DeleteRole(payload)); + dispatchDeleteRole(...args: ConstructorParameters) { + return this.store.dispatch(new DeleteRole(...args)); } - dispatchCreateRole(payload: Identity.RoleSaveRequest) { - return this.store.dispatch(new CreateRole(payload)); + dispatchCreateRole(...args: ConstructorParameters) { + return this.store.dispatch(new CreateRole(...args)); } - dispatchUpdateRole(payload: Identity.RoleItem) { - return this.store.dispatch(new UpdateRole(payload)); + dispatchUpdateRole(...args: ConstructorParameters) { + return this.store.dispatch(new UpdateRole(...args)); } - dispatchGetUsers(payload?: ABP.PageQueryParams) { - return this.store.dispatch(new GetUsers(payload)); + dispatchGetUsers(...args: ConstructorParameters) { + return this.store.dispatch(new GetUsers(...args)); } - dispatchGetUserById(payload: string) { - return this.store.dispatch(new GetUserById(payload)); + dispatchGetUserById(...args: ConstructorParameters) { + return this.store.dispatch(new GetUserById(...args)); } - dispatchDeleteUser(payload: string) { - return this.store.dispatch(new DeleteUser(payload)); + dispatchDeleteUser(...args: ConstructorParameters) { + return this.store.dispatch(new DeleteUser(...args)); } - dispatchCreateUser(payload: Identity.UserSaveRequest) { - return this.store.dispatch(new CreateUser(payload)); + dispatchCreateUser(...args: ConstructorParameters) { + return this.store.dispatch(new CreateUser(...args)); } - dispatchUpdateUser(payload: Identity.UserSaveRequest & { id: string }) { - return this.store.dispatch(new UpdateUser(payload)); + dispatchUpdateUser(...args: ConstructorParameters) { + return this.store.dispatch(new UpdateUser(...args)); } - dispatchGetUserRoles(payload: string) { - return this.store.dispatch(new GetUserRoles(payload)); + dispatchGetUserRoles(...args: ConstructorParameters) { + return this.store.dispatch(new GetUserRoles(...args)); } }