forked from Shared/esg
final update on moallm client
This commit is contained in:
@@ -7,6 +7,7 @@ import {
|
||||
import { Observable } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { BaseInquiryResponseDto } from '../dto/base-inquiry-response.dto';
|
||||
import { normalizeInquiryResponse } from '../helpers/inquiry-response.helper';
|
||||
|
||||
/**
|
||||
* Ensures inquiry endpoints always emit BaseInquiryResponseDto shape.
|
||||
@@ -15,7 +16,7 @@ import { BaseInquiryResponseDto } from '../dto/base-inquiry-response.dto';
|
||||
export class ResponseTransformInterceptor implements NestInterceptor {
|
||||
intercept(_context: ExecutionContext, next: CallHandler): Observable<unknown> {
|
||||
return next.handle().pipe(
|
||||
map((data: BaseInquiryResponseDto) => data),
|
||||
map((data: BaseInquiryResponseDto) => normalizeInquiryResponse(data)),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user