优化短信验证码验证

This commit is contained in:
cool 2023-10-17 20:55:51 +08:00
parent 188f6263cf
commit 32a261700b

View File

@ -40,7 +40,7 @@ export class UserSmsService extends BaseService {
*/ */
async checkCode(phone, code) { async checkCode(phone, code) {
const cacheCode = await this.cacheManager.get(`sms:${phone}`); const cacheCode = await this.cacheManager.get(`sms:${phone}`);
if (cacheCode === code) { if (cacheCode == code) {
return true; return true;
} }
return false; return false;