Skip to content

Commit

Permalink
비밀번호 초기화 api 로깅
Browse files Browse the repository at this point in the history
  • Loading branch information
Hank-Choi committed Oct 30, 2024
1 parent 185774d commit 7aaeeee
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/core/user/UserService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ import ErrorCode from "@app/api/enum/ErrorCode";
import TimetableService = require('@app/core/timetable/TimetableService');
import UserRepository = require('@app/core/user/UserRepository');
import CourseBookService = require('@app/core/coursebook/CourseBookService');
import * as winston from "winston";

var logger = winston.loggers.get('default');

export function getVerifiedByEmail(email: string): Promise<User> {
return UserRepository.findActiveByVerifiedEmail(email);
Expand Down Expand Up @@ -197,6 +200,9 @@ export async function verifyResetPasswordCode(user: User, codeSubmitted: string)
const verificationValue: RedisVerificationValue = JSON.parse(await RedisUtil.get(key))

if (!verificationValue) {
logger.info(`userid: ${user._id}`)
logger.info(`codesubmitted: ${codeSubmitted}`)
logger.info(`value: ${verificationValue}`)
throw new ApiError(409, ErrorCode.RESET_PASSWORD_NO_REQUEST, "비밀번호 재설정을 다시 시도해주세요.")
}

Expand Down

0 comments on commit 7aaeeee

Please sign in to comment.