import client from './client' export interface Astuce { id?: number titre: string contenu: string categorie?: string tags?: string mois?: string photos?: string videos?: string source?: string created_at?: string } export const astucesApi = { list: (params?: { categorie?: string; mois?: number; tag?: string }) => client.get('/api/astuces', { params }).then(r => r.data), get: (id: number) => client.get(`/api/astuces/${id}`).then(r => r.data), create: (a: Omit) => client.post('/api/astuces', a).then(r => r.data), update: (id: number, a: Partial) => client.put(`/api/astuces/${id}`, a).then(r => r.data), remove: (id: number) => client.delete(`/api/astuces/${id}`), }