/
githubmirror
/
nest
Обзор
Документация
Войти
/
githubmirror
/
nest
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
integration/graphql-code-first/src/common/interceptors/data.interceptor.ts
15 строк
381 B
Kamil Myśliwiec
Merge branch '7.0.0' of https://github.com/nestjs/nest into 7.0.0
29 фев 2020, 15:21
Не верифицирован
29 фев 2020, 15:21
e26f9c6
Код
Авторство
О чём код?
import { CallHandler, ExecutionContext, Injectable, NestInterceptor, } from '@nestjs/common'; import { Observable } from 'rxjs'; import { tap } from 'rxjs/operators'; @Injectable() export class DataInterceptor implements NestInterceptor { intercept(context: ExecutionContext, next: CallHandler): Observable<any> { return next.handle().pipe(tap(data => data)); } }