This commit is contained in:
@@ -857,6 +857,7 @@ export interface Category {
|
||||
name: string;
|
||||
color: string;
|
||||
is_coming_soon: boolean;
|
||||
position: number;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
@@ -922,6 +923,20 @@ export const deleteCategoryAdmin = async (
|
||||
}
|
||||
};
|
||||
|
||||
export const reorderCategoriesAdmin = async (
|
||||
ids: number[],
|
||||
): Promise<{ success: boolean; error?: string }> => {
|
||||
try {
|
||||
await apiClient.put(`${V2}/admin/protected/categories/reorder`, { ids });
|
||||
return { success: true };
|
||||
} catch (error: any) {
|
||||
return {
|
||||
success: false,
|
||||
error: error.response?.data?.error || "Erreur",
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
// ============================================
|
||||
// PARAMÈTRES GLOBAUX
|
||||
// ============================================
|
||||
|
||||
Reference in New Issue
Block a user