basic requirements

This commit is contained in:
sbriat
2023-02-06 13:50:07 +01:00
parent bb5cd96bd9
commit a743fefe94
68 changed files with 18879 additions and 73 deletions

View File

@@ -0,0 +1,14 @@
import { Injectable, ValidationPipe } from '@nestjs/common';
import { RpcException } from '@nestjs/microservices';
@Injectable()
export class RpcValidationPipe extends ValidationPipe {
createExceptionFactory() {
return (validationErrors = []) => {
return new RpcException({
code: 3,
message: this.flattenValidationErrors(validationErrors),
});
};
}
}