Skip to content

Commit 040a506

Browse files
committed
fix(user): add async to reset requests
1 parent ba0b5f0 commit 040a506

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/user/user.service.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ export class UserService {
1010
constructor(@InjectModel(User.name) private readonly userRepository: Model<UserDocument>) {}
1111

1212
@Cron(CronExpression.EVERY_DAY_AT_MIDNIGHT)
13-
resetRequestsUsed() {
14-
this.userRepository.updateMany({}, { requestsUsed: 0 });
13+
async resetRequestsUsed() {
14+
await this.userRepository.updateMany({}, { requestsUsed: 0 });
1515
this.logger.log('Finish: Reset requests used');
1616
}
1717
}

0 commit comments

Comments
 (0)