Browse Source

refactor(identity): change state service dispatcher parameters

pull/2431/head
TheDiaval 7 years ago
parent
commit
6f9422d8f2
  1. 44
      npm/ng-packs/packages/identity/src/lib/services/identity-state.service.ts

44
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); return this.store.selectSnapshot(IdentityState.getUsersTotalCount);
} }
dispatchGetRoles(payload?: ABP.PageQueryParams) { dispatchGetRoles(...args: ConstructorParameters<typeof GetRoles>) {
return this.store.dispatch(new GetRoles(payload)); return this.store.dispatch(new GetRoles(...args));
} }
dispatchGetRoleById(payload: string) { dispatchGetRoleById(...args: ConstructorParameters<typeof GetRoleById>) {
return this.store.dispatch(new GetRoleById(payload)); return this.store.dispatch(new GetRoleById(...args));
} }
dispatchDeleteRole(payload: string) { dispatchDeleteRole(...args: ConstructorParameters<typeof DeleteRole>) {
return this.store.dispatch(new DeleteRole(payload)); return this.store.dispatch(new DeleteRole(...args));
} }
dispatchCreateRole(payload: Identity.RoleSaveRequest) { dispatchCreateRole(...args: ConstructorParameters<typeof CreateRole>) {
return this.store.dispatch(new CreateRole(payload)); return this.store.dispatch(new CreateRole(...args));
} }
dispatchUpdateRole(payload: Identity.RoleItem) { dispatchUpdateRole(...args: ConstructorParameters<typeof UpdateRole>) {
return this.store.dispatch(new UpdateRole(payload)); return this.store.dispatch(new UpdateRole(...args));
} }
dispatchGetUsers(payload?: ABP.PageQueryParams) { dispatchGetUsers(...args: ConstructorParameters<typeof GetUsers>) {
return this.store.dispatch(new GetUsers(payload)); return this.store.dispatch(new GetUsers(...args));
} }
dispatchGetUserById(payload: string) { dispatchGetUserById(...args: ConstructorParameters<typeof GetUserById>) {
return this.store.dispatch(new GetUserById(payload)); return this.store.dispatch(new GetUserById(...args));
} }
dispatchDeleteUser(payload: string) { dispatchDeleteUser(...args: ConstructorParameters<typeof DeleteUser>) {
return this.store.dispatch(new DeleteUser(payload)); return this.store.dispatch(new DeleteUser(...args));
} }
dispatchCreateUser(payload: Identity.UserSaveRequest) { dispatchCreateUser(...args: ConstructorParameters<typeof CreateUser>) {
return this.store.dispatch(new CreateUser(payload)); return this.store.dispatch(new CreateUser(...args));
} }
dispatchUpdateUser(payload: Identity.UserSaveRequest & { id: string }) { dispatchUpdateUser(...args: ConstructorParameters<typeof UpdateUser>) {
return this.store.dispatch(new UpdateUser(payload)); return this.store.dispatch(new UpdateUser(...args));
} }
dispatchGetUserRoles(payload: string) { dispatchGetUserRoles(...args: ConstructorParameters<typeof GetUserRoles>) {
return this.store.dispatch(new GetUserRoles(payload)); return this.store.dispatch(new GetUserRoles(...args));
} }
} }

Loading…
Cancel
Save