refactor: revew all design of services, clients, deadcode, ...
This commit is contained in:
26
clients/domains/skills-client.ts
Normal file
26
clients/domains/skills-client.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import { BaseHttpClient } from "../base/http-client";
|
||||
import { SkillCategory } from "../../lib/types";
|
||||
|
||||
export class SkillsClient extends BaseHttpClient {
|
||||
/**
|
||||
* Crée une nouvelle skill
|
||||
*/
|
||||
async createSkill(
|
||||
categoryId: string,
|
||||
skill: {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
icon?: string;
|
||||
links: string[];
|
||||
}
|
||||
): Promise<boolean> {
|
||||
try {
|
||||
await this.post(`/skills/${categoryId}`, skill);
|
||||
return true;
|
||||
} catch (error) {
|
||||
console.error("Erreur lors de la création de la skill:", error);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user