- 共享 PASSWORD_RULES:新增账号与重置密码弹窗统一 - 原 max:72 按字符数校验,多字节密码(如中文 3 字节)会通过前端校验却被服务端 @MaxByteLength(72) 拒绝;改为 TextEncoder 字节数校验
16 lines
363 B
TypeScript
16 lines
363 B
TypeScript
export interface UserProfileFormValues {
|
|
joinedAt?: string;
|
|
qualifications?: string;
|
|
}
|
|
|
|
export interface UserProfileResponse {
|
|
id?: number;
|
|
username?: string;
|
|
name?: string;
|
|
profile?: UserProfileFormValues | null;
|
|
}
|
|
|
|
export const userProfileResponseToFormValues = (
|
|
response: UserProfileResponse,
|
|
): UserProfileFormValues => response.profile || {};
|