add opa, refactor auth to authentication

This commit is contained in:
Gsk54
2023-01-16 15:03:58 +01:00
parent 0a2a44bc15
commit 6802cd3620
61 changed files with 456 additions and 381 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),
});
};
}
}