UNPKG

hackages

Version:

CLI tool for learning software development concepts through test-driven development

23 lines (22 loc) 656 B
import { apiClient } from "./api"; import { printError } from "../utils/console"; export async function getProgress() { try { const response = await apiClient.progress.getProgress(); return response.progress; } catch (error) { printError(`Failed to get progress: ${error}`); throw error; } } export async function updateProgress(exerciseId, status, score) { try { const response = await apiClient.progress.updateProgress(exerciseId, status, score); return response.success; } catch (error) { printError(`Failed to update progress: ${error}`); throw error; } }