From b6c763457aa95a25852d9d1017749540c13390fa Mon Sep 17 00:00:00 2001 From: Brandon Roberts Date: Thu, 15 Feb 2018 07:29:35 -0600 Subject: [PATCH] fix(Schematics): Correct usage of upsert actions for entity blueprint --- docs/entity/adapter.md | 4 ++-- .../__name@dasherize@group-actions__.actions.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/entity/adapter.md b/docs/entity/adapter.md index bd9f130d7f..f5b67c3f6d 100644 --- a/docs/entity/adapter.md +++ b/docs/entity/adapter.md @@ -136,7 +136,7 @@ export class AddUser implements Action { export class UpsertUser implements Action { readonly type = UserActionTypes.UPSERT_USER; - constructor(public payload: { user: User }) {} + constructor(public payload: { user: Update }) {} } export class AddUsers implements Action { @@ -148,7 +148,7 @@ export class AddUsers implements Action { export class UpsertUsers implements Action { readonly type = UserActionTypes.UPSERT_USERS; - constructor(public payload: { users: User[] }) {} + constructor(public payload: { users: Update[] }) {} } export class UpdateUser implements Action { diff --git a/modules/schematics/src/entity/files/__path__/__name@dasherize@if-flat__/__name@dasherize@group-actions__.actions.ts b/modules/schematics/src/entity/files/__path__/__name@dasherize@if-flat__/__name@dasherize@group-actions__.actions.ts index 31bec63799..005b1a99eb 100644 --- a/modules/schematics/src/entity/files/__path__/__name@dasherize@if-flat__/__name@dasherize@group-actions__.actions.ts +++ b/modules/schematics/src/entity/files/__path__/__name@dasherize@if-flat__/__name@dasherize@group-actions__.actions.ts @@ -30,7 +30,7 @@ export class Add<%= classify(name) %> implements Action { export class Upsert<%= classify(name) %> implements Action { readonly type = <%= classify(name) %>ActionTypes.Upsert<%= classify(name) %>; - constructor(public payload: { <%= camelize(name) %>: <%= classify(name) %> }) {} + constructor(public payload: { <%= camelize(name) %>: Update<<%= classify(name) %>> }) {} } export class Add<%= classify(name) %>s implements Action { @@ -42,7 +42,7 @@ export class Add<%= classify(name) %>s implements Action { export class Upsert<%= classify(name) %>s implements Action { readonly type = <%= classify(name) %>ActionTypes.Upsert<%= classify(name) %>s; - constructor(public payload: { <%= camelize(name) %>s: <%= classify(name) %>[] }) {} + constructor(public payload: { <%= camelize(name) %>s: Update<<%= classify(name) %>>[] }) {} } export class Update<%= classify(name) %> implements Action {