refactor: revew all design of services, clients, deadcode, ...
This commit is contained in:
@@ -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[] {
|
||||
|
||||
Reference in New Issue
Block a user