Skip to content

Commit

Permalink
fix: endpoint create
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewPattell committed Mar 16, 2023
1 parent 4641223 commit 9861a6b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/services/endpoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -769,8 +769,8 @@ const updateDefaultHandler = async <TEntity>(
}

const { entity } = await viewDefaultHandler(query);
const result = plainToInstance(
(entity as ObjectLiteral).constructor as Constructable<Record<string, any>>,
const result: TEntity & Partial<TEntity> = plainToInstance(
repository.target as Constructable<TEntity>,
{
...entity,
...fields,
Expand Down

0 comments on commit 9861a6b

Please sign in to comment.