From 17c04dc616b1bb336e8b98a9e76a11ee37e14fce Mon Sep 17 00:00:00 2001 From: mozzie Date: Sat, 25 Mar 2023 20:41:00 +0800 Subject: [PATCH] fix: sms bug --- apps/server/src/controller/user.controller.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/server/src/controller/user.controller.ts b/apps/server/src/controller/user.controller.ts index 2097df4..4b412d6 100644 --- a/apps/server/src/controller/user.controller.ts +++ b/apps/server/src/controller/user.controller.ts @@ -127,8 +127,7 @@ export class UserController { // 防止接口调用 end const code = Math.floor(Math.random() * 9000 + 1000); await this.redisService.set('' + phoneNumbers, code, 'EX', 60); - if (process.env.EGG_SERVER_ENV === 'prod') - await this.smsService.send({ code, phoneNumbers }); + await this.smsService.send({ code, phoneNumbers }); return { code: BizCode.OK }; } catch (error) { this.ctx.logger.error(error);