refactor: update data fetching in management pages and improve type imports
- Simplified data extraction from AdminService in SkillsPage, TeamsPage, and UsersPage. - Updated import paths for Team type in user-related components for consistency. - Added id and name properties to SkillCategory interface for better data structure. - Enhanced logging in useSkillsManagement for debugging skill creation process.
This commit is contained in:
@@ -75,8 +75,8 @@ export async function POST(request: NextRequest) {
|
||||
|
||||
// Créer la nouvelle skill
|
||||
const result = await pool.query(
|
||||
`INSERT INTO skills (name, category_id, description, icon)
|
||||
VALUES ($1, $2, $3, $4)
|
||||
`INSERT INTO skills (id, name, category_id, description, icon)
|
||||
VALUES (gen_random_uuid(), $1, $2, $3, $4)
|
||||
RETURNING id, name, description, icon, category_id`,
|
||||
[name, categoryId, description || "", icon || ""]
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user