From e502ab2cd9f799624c0d23f9ce3b42e66aa9a24b Mon Sep 17 00:00:00 2001 From: Samridha Das Date: Mon, 4 Dec 2023 11:31:47 +0530 Subject: [PATCH] added workflows --- .github/workflows/ci.yml | 23 +++++++++++++++++++++++ src/auth/auth.controller.ts | 1 + src/auth/auth.service.ts | 3 +-- 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..c7030d0 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,23 @@ +name: CI Build + +on: + push: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v1 + with: + node-version: '18' + + - name: Install dependencies + run: npm install + + - name: Run build + run: npm run build diff --git a/src/auth/auth.controller.ts b/src/auth/auth.controller.ts index 8237dea..668e825 100644 --- a/src/auth/auth.controller.ts +++ b/src/auth/auth.controller.ts @@ -19,6 +19,7 @@ import { User as UserDecorator } from "../decorator/user.decorator"; path: "auth", version: "1", }) + @UseInterceptors(MongooseClassSerializerInterceptor(User)) export class AuthController { constructor( diff --git a/src/auth/auth.service.ts b/src/auth/auth.service.ts index 4c70ba0..49137ef 100644 --- a/src/auth/auth.service.ts +++ b/src/auth/auth.service.ts @@ -10,8 +10,7 @@ export class AuthService { constructor( private userService: UsersService, private jwtService: JwtService - ) { - } + ){} async validateUser(email: string, password: string) { const user = await this.userService.findByEmail(email);