Skip to content

Commit

Permalink
create: auth module, controller and service
Browse files Browse the repository at this point in the history
  • Loading branch information
adiCacti committed May 12, 2022
1 parent f61cc56 commit d05e6cc
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/auth/auth.controller.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { Controller, Post } from '@nestjs/common';
import { AuthService } from './auth.service';

@Controller('auth')
export class AuthController {
constructor(private authService: AuthService) {}

@Post('signup')
signup() {
return this.authService.signup();
}

@Post('signin')
signin() {
return this.authService.signin();
}
}
9 changes: 9 additions & 0 deletions src/auth/auth.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { Module } from '@nestjs/common';
import { AuthController } from './auth.controller';
import { AuthService } from './auth.service';

@Module({
controllers: [AuthController],
providers: [AuthService],
})
export class AuthModule {}
12 changes: 12 additions & 0 deletions src/auth/auth.service.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { Injectable } from '@nestjs/common';

@Injectable({})
export class AuthService {
signup() {
return { msg: 'I am signed up' };
}

signin() {
return { msg: 'I am signed in' };
}
}

0 comments on commit d05e6cc

Please sign in to comment.