fix(teacher): 独立刷新老师目录以缩短配置更新延迟

This commit is contained in:
brother7 committed 2026-09-29 12:03:06 +08:00
1 parent 2767a15017
commit 913ccad577
9 files changed
+184 -7

No files matched your search

+5
View File
@@ -73,6 +73,11 @@ export const teacherAvailability = (account: TeacherAccount) =>
teacherCloudRequest<TeacherAvailability>(account, '/api/coding-teacher/config');
export const teacherCatalog = (account: TeacherAccount) =>
teacherCloudRequest<TeacherCatalog>(account, '/api/coding-teacher/teachers');
export async function teacherCatalogRevision(): Promise<{ revision: number }> {
const binding = getWorksSquareAccountBinding();
if (!binding) throw new TeacherError(401, 'teacher_auth_required', '请先登录。');
return teacherCloudRequest({ id: '', binding }, '/api/coding-teacher/teachers/revision');
}
export const teacherVersion = (account: TeacherAccount, version: number) =>
teacherCloudRequest<{ version: number; payload: TeacherDefinition }>(
account,