fix and update
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { CallHandler, ExecutionContext, Injectable, NestInterceptor } from '@nestjs/common';
|
||||
import { JwtService } from '@nestjs/jwt';
|
||||
import { Observable, tap } from 'rxjs';
|
||||
import { Observable, mergeMap } from 'rxjs';
|
||||
import type { Response } from 'express';
|
||||
import { attachFedcmCookieFromAuthResult } from '../lib/fedcm-cookie';
|
||||
|
||||
@@ -13,8 +13,9 @@ export class FedcmCookieInterceptor implements NestInterceptor {
|
||||
const response = http.getResponse<Response>();
|
||||
|
||||
return next.handle().pipe(
|
||||
tap((data) => {
|
||||
attachFedcmCookieFromAuthResult(response, this.jwt, data);
|
||||
mergeMap(async (data) => {
|
||||
await attachFedcmCookieFromAuthResult(response, this.jwt, data);
|
||||
return data;
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user