forked from wangziqi/gongxue-base
fix(admin): match flat API response shape, no nested data envelope
This commit is contained in:
@@ -49,13 +49,11 @@ interface OrgTreeWithUsersResponse {
|
||||
|
||||
interface ImportUsersResponse {
|
||||
success: boolean;
|
||||
data: {
|
||||
teacherCount: number;
|
||||
studentCount: number;
|
||||
classCount: number;
|
||||
skipped: number;
|
||||
warnings: string[];
|
||||
};
|
||||
teacherCount: number;
|
||||
studentCount: number;
|
||||
classCount: number;
|
||||
skipped: number;
|
||||
warnings: string[];
|
||||
}
|
||||
|
||||
interface ClassMarkForm {
|
||||
@@ -355,8 +353,7 @@ const IntegrationConfigPage: React.FC = () => {
|
||||
users: usersPayload,
|
||||
};
|
||||
|
||||
const res: any = await api.post('/sync/dingtalk/import-users', payload);
|
||||
const data = res.data;
|
||||
const data: any = await api.post('/sync/dingtalk/import-users', payload);
|
||||
message.success(
|
||||
`导入完成:${data.teacherCount} 位老师,${data.studentCount} 位学生` +
|
||||
(data.classCount ? `,${data.classCount} 个班级` : '') +
|
||||
|
||||
Reference in New Issue
Block a user