Skip to content

Commit

Permalink
docs(pipes): drop injectable marker on zod validation pipe
Browse files Browse the repository at this point in the history
  • Loading branch information
micalevisk authored Aug 22, 2023
1 parent 6ed0214 commit cd7b29c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions content/pipes.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,9 @@ In the next section, you'll see how we supply the appropriate schema for a given

```typescript
@@filename()
import { PipeTransform, Injectable, ArgumentMetadata, BadRequestException } from '@nestjs/common';
import { PipeTransform, ArgumentMetadata, BadRequestException } from '@nestjs/common';
import { ZodObject } from 'zod';

@Injectable()
export class ZodValidationPipe implements PipeTransform {
constructor(private schema: ZodObject<any>) {}

Expand All @@ -265,10 +264,9 @@ export class ZodValidationPipe implements PipeTransform {
}
}
@@switch
import { Injectable, BadRequestException } from '@nestjs/common';
import { BadRequestException } from '@nestjs/common';
import { ZodObject } from 'zod';

@Injectable()
export class ZodValidationPip {
constructor(private schema) {}

Expand Down

0 comments on commit cd7b29c

Please sign in to comment.