Skip to content

Commit ccd9458

Browse files
committed
Fix ObjectViewPipe to accept value transformations
1 parent ea519e4 commit ccd9458

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/components/changeset/dto/changeset.args.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,11 @@ export const IdsAndViewArg = () =>
2424
export class ObjectViewPipe implements PipeTransform {
2525
constructor(private readonly validator: ValidationPipe) {}
2626

27-
async transform({ id, changeset }: ChangesetIds) {
28-
await this.validator.transform(
29-
{ id, changeset },
30-
{
31-
metatype: ChangesetIds,
32-
type: 'body',
33-
},
34-
);
27+
async transform(input: ChangesetIds) {
28+
const { id, changeset } = await this.validator.transform(input, {
29+
metatype: ChangesetIds,
30+
type: 'body',
31+
});
3532
const view: ObjectView = changeset ? { changeset } : { active: true };
3633
return { id, changeset, view };
3734
}

0 commit comments

Comments
 (0)