fix(auth): 修复 TypeScript 编译错误 — RegisterDto.password 可选 + Aliyun import 类型
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
8a12bc225d
commit
9eb35e5f1e
|
|
@ -20,7 +20,7 @@ import { EventPublisherService } from './event-publisher.service';
|
||||||
export interface RegisterDto {
|
export interface RegisterDto {
|
||||||
phone: string;
|
phone: string;
|
||||||
smsCode: string;
|
smsCode: string;
|
||||||
password: string;
|
password?: string;
|
||||||
nickname?: string;
|
nickname?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -70,11 +70,14 @@ export class AliyunSmsProvider implements ISmsProvider {
|
||||||
private async getClient() {
|
private async getClient() {
|
||||||
if (this.client) return this.client;
|
if (this.client) return this.client;
|
||||||
|
|
||||||
// 动态导入 (仅生产环境需要)
|
// 动态导入 (仅生产环境需要, 开发环境不安装这些包)
|
||||||
const { default: Dysmsapi20170525 } = await import(
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||||
'@alicloud/dysmsapi20170525'
|
const { default: Dysmsapi20170525 } = await (import(
|
||||||
);
|
/* webpackIgnore: true */ '@alicloud/dysmsapi20170525'
|
||||||
const { Config } = await import('@alicloud/openapi-client');
|
) as any);
|
||||||
|
const { Config } = await (import(
|
||||||
|
/* webpackIgnore: true */ '@alicloud/openapi-client'
|
||||||
|
) as any);
|
||||||
|
|
||||||
const config = new Config({
|
const config = new Config({
|
||||||
accessKeyId: process.env.ALIYUN_ACCESS_KEY_ID,
|
accessKeyId: process.env.ALIYUN_ACCESS_KEY_ID,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue