

@UseGuards(AuthGuard()) 함수 형태로 수정.

이처럼 AuthGuard() 형태로 함수 호출을 추가해 주면 metatype is not a constructor 오류를 해결할 수 있습니다.
위 수정으로 metatype 오류가 해결된 후에도, 새로운 오류가 발생할 수 있습니다.
ERROR [AuthGuard] In order to use "defaultStrategy", please, ensure to import PassportModule in each place where AuthGuard() is being used. Otherwise, passport won't work correctly.

이는 PassportModule의 기본 전략이 설정되지 않았을 때 발생하는 오류입니다. 이 문제를 해결하기 위해 PassportModule을 불러오고, defaultStrategy를 jwt로 지정해주어야 합니다.

PassportModule.register({ defaultStrategy: 'jwt' }),
이렇게 설정하면, 패스포트가 jwt 전략을 기본으로 사용하여 토큰 기반 인증을 처리할 수 있게 됩니다.