fix(admin): restore nested ImportUsersResponse and remove debug console.log
This commit is contained in:
@@ -49,11 +49,13 @@ interface OrgTreeWithUsersResponse {
|
||||
|
||||
interface ImportUsersResponse {
|
||||
success: boolean;
|
||||
teacherCount: number;
|
||||
studentCount: number;
|
||||
classCount: number;
|
||||
skipped: number;
|
||||
warnings: string[];
|
||||
data: {
|
||||
teacherCount: number;
|
||||
studentCount: number;
|
||||
classCount: number;
|
||||
skipped: number;
|
||||
warnings: string[];
|
||||
};
|
||||
}
|
||||
|
||||
interface ClassMarkForm {
|
||||
@@ -346,11 +348,10 @@ const IntegrationConfigPage: React.FC = () => {
|
||||
? (teacherRoles[u.dingUserId] || defaultTeacherRoleId)
|
||||
: null,
|
||||
dingDeptIds: u.deptIds,
|
||||
})),
|
||||
};
|
||||
console.log('[import payload]', JSON.stringify(payload, null, 2));
|
||||
|
||||
const data = await api.post<ImportUsersResponse>('/sync/dingtalk/import-users', payload);
|
||||
const res = await api.post<ImportUsersResponse>('/sync/dingtalk/import-users', payload);
|
||||
const data = res.data;
|
||||
message.success(
|
||||
`导入完成:${data.teacherCount} 位老师,${data.studentCount} 位学生` +
|
||||
(data.classCount ? `,${data.classCount} 个班级` : '') +
|
||||
|
||||
Reference in New Issue
Block a user