Skip to content

Commit

Permalink
refactor: Replace with appropriate function
Browse files Browse the repository at this point in the history
  • Loading branch information
holmir97 committed Apr 25, 2022
1 parent 1e70e37 commit b0775a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scheduler/userScheduler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const userScan = schedule.scheduleJob("0 0 0 * * *", async () => {
// 삭제 예정 유저
const deletedUsers = await User.find(keysToSnake({ isDeleted: true }));

deletedUsers.map(async (user) => {
deletedUsers.forEach(async (user) => {
// 현재 날짜가 만료 날짜 이후
if (current.getTime() >= user.expired_at.getTime()) {
// 해당 유저가 가진 리뷰 모두 삭제
Expand Down

0 comments on commit b0775a8

Please sign in to comment.