mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 04:10:32 +00:00
refactor(nestjs): pdf templates
This commit is contained in:
@@ -70,7 +70,10 @@ export class SerializeInterceptor implements NestInterceptor<any, any> {
|
||||
next: CallHandler<any>,
|
||||
): Observable<any> {
|
||||
const request = context.switchToHttp().getRequest();
|
||||
|
||||
// Transform both body and query parameters
|
||||
request.body = this.strategy.in(request.body);
|
||||
request.query = this.strategy.in(request.query);
|
||||
|
||||
// handle returns stream..
|
||||
return next.handle().pipe(map(this.strategy.out));
|
||||
|
||||
@@ -19,7 +19,7 @@ export class ValidationPipe implements PipeTransform<any> {
|
||||
if (errors.length > 0) {
|
||||
throw new BadRequestException(errors);
|
||||
}
|
||||
return value;
|
||||
return object;
|
||||
}
|
||||
|
||||
private toValidate(metatype: Function): boolean {
|
||||
|
||||
Reference in New Issue
Block a user