Refactor code structure for improved readability and maintainability

This commit is contained in:
2026-04-24 13:05:28 -04:00
parent 466f74b717
commit 9c2edad614
5 changed files with 264 additions and 44 deletions
+1 -1
View File
@@ -169,7 +169,7 @@ export default function BackgroundTasksPage() {
<div className="text-xs text-gray-400">({format(new Date(task.updated_at), 'yyyy')})</div>
</td>
<td className="px-6 py-4 text-right space-x-2">
{task.task_type === 'lesson_transcription' && task.status === 'failed' && (
{(task.task_type === 'lesson_transcription' || task.task_type === 'zip_rag_import') && task.status === 'failed' && (
<button
onClick={() => handleRetry(task.id)}
disabled={actionLoading === task.id}
+1 -1
View File
@@ -926,7 +926,7 @@ export const apiFetch = (url: string, options: ApiFetchOptions = {}, isLms: bool
}
}
// Handle no-content responses
if (res.status === 204) return;
if (res.status === 204 || res.status === 202) return;
return res.json();
});
};
File diff suppressed because one or more lines are too long