diff --git a/backend/src/managers/auth/guards/guest.strategy.ts b/backend/src/managers/auth/guards/guest.strategy.ts index 659f0e3..d897ec2 100644 --- a/backend/src/managers/auth/guards/guest.strategy.ts +++ b/backend/src/managers/auth/guards/guest.strategy.ts @@ -1,18 +1,8 @@ import { Injectable } from '@nestjs/common'; import { PassportStrategy } from '@nestjs/passport'; -import { Request } from 'express'; -import { ParamsDictionary } from 'express-serve-static-core'; import { Strategy } from 'passport-strategy'; -import { ParsedQs } from 'qs'; import { GuestService } from '../guest.service'; - -type ReqType = Request< - ParamsDictionary, - any, - any, - ParsedQs, - Record ->; +import { ReqType } from './reqtype'; class GuestPassportStrategy extends Strategy { // Will be overridden by the nest implementation diff --git a/backend/src/managers/auth/guards/jwt.strategy.ts b/backend/src/managers/auth/guards/jwt.strategy.ts index a59bcab..49333a1 100644 --- a/backend/src/managers/auth/guards/jwt.strategy.ts +++ b/backend/src/managers/auth/guards/jwt.strategy.ts @@ -1,11 +1,11 @@ import { Inject, Injectable, Logger } from '@nestjs/common'; import { PassportStrategy } from '@nestjs/passport'; -import { ExtractJwt, Strategy } from 'passport-jwt'; +import { ExtractJwt, Strategy as JwtPassportStrategy } from 'passport-jwt'; import { JwtDataSchema } from 'picsur-shared/dist/dto/jwt.dto'; import { EUser } from 'picsur-shared/dist/entities/user.entity'; @Injectable() -export class JwtStrategy extends PassportStrategy(Strategy, 'jwt') { +export class JwtStrategy extends PassportStrategy(JwtPassportStrategy, 'jwt') { private readonly logger = new Logger('JwtStrategy'); constructor(@Inject('JWT_SECRET') jwtSecret: string) { diff --git a/backend/src/managers/auth/guards/reqtype.ts b/backend/src/managers/auth/guards/reqtype.ts new file mode 100644 index 0000000..1c08634 --- /dev/null +++ b/backend/src/managers/auth/guards/reqtype.ts @@ -0,0 +1,11 @@ +import { Request } from 'express'; +import { ParamsDictionary } from 'express-serve-static-core'; +import { ParsedQs } from 'qs'; + +export type ReqType = Request< + ParamsDictionary, + any, + any, + ParsedQs, + Record +>;