issue # 이메일 인증 코드 발송 로직 구현
This commit is contained in:
@@ -1,14 +1,27 @@
|
||||
import { Controller, Get, Post, Query } from "@nestjs/common";
|
||||
import { Body, Controller, Get, Post, Query } from "@nestjs/common";
|
||||
import { CheckDuplicationRequestDto } from "./dto/checkDuplication/check-duplication-request.dto";
|
||||
import { CheckDuplicationResponseDto } from "./dto/checkDuplication/check-duplication-response.dto";
|
||||
import { AccountService } from "./account.service";
|
||||
import { SendVerificationCodeRequestDto } from "./dto/checkDuplication/send-verification-code-request.dto";
|
||||
import { SendVerificationCodeResponseDto } from "./dto/checkDuplication/send-verification-code-response.dto";
|
||||
|
||||
@Controller('account')
|
||||
export class AccountController {
|
||||
constructor(private readonly accountService: AccountService) {}
|
||||
|
||||
@Get('/')
|
||||
async test() {
|
||||
return "Test"
|
||||
}
|
||||
|
||||
@Get('check-duplication')
|
||||
async checkDuplication(@Query() query: CheckDuplicationRequestDto): Promise<CheckDuplicationResponseDto> {
|
||||
return this.accountService.checkDuplication(query);
|
||||
return await this.accountService.checkDuplication(query);
|
||||
}
|
||||
|
||||
@Post('send-verification-code')
|
||||
async sendVerificationCode(@Body() body: SendVerificationCodeRequestDto): Promise<SendVerificationCodeResponseDto> {
|
||||
const result = await this.accountService.sendVerificationCode(body);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user