refactor: revew all design of services, clients, deadcode, ...

This commit is contained in:
Julien Froidefond
2025-08-24 22:03:15 +02:00
parent f4dcc89c11
commit 6fba622003
63 changed files with 969 additions and 1846 deletions

View File

@@ -6,7 +6,7 @@ import {
UserEvaluation,
SkillCategory,
} from "./types";
import { apiClient } from "../services/api-client";
import { evaluationClient } from "../clients";
export function calculateCategoryScore(
categoryEvaluation: CategoryEvaluation
@@ -45,28 +45,6 @@ export function generateRadarData(
});
}
export async function saveUserEvaluation(
evaluation: UserEvaluation
): Promise<void> {
try {
await apiClient.saveUserEvaluation(evaluation);
} catch (error) {
console.error("Failed to save user evaluation:", error);
throw error;
}
}
export async function loadUserEvaluation(
profile: UserEvaluation["profile"]
): Promise<UserEvaluation | null> {
try {
return await apiClient.loadUserEvaluation(profile);
} catch (error) {
console.error("Failed to load user evaluation:", error);
return null;
}
}
export function createEmptyEvaluation(
categories: SkillCategory[]
): CategoryEvaluation[] {