This commit is contained in:
pwy3282040@msecure.co
2025-12-27 00:17:46 +09:00
commit 87405e897e
34 changed files with 6264 additions and 0 deletions

9
src/api/category.ts Normal file
View File

@@ -0,0 +1,9 @@
// src/api/category.ts
import { http } from './http';
import { ApiResponse, Category } from '@/types';
// 카테고리 트리 구조 조회 (GET /api/categories)
export const getCategories = async () => {
const response = await http.get<ApiResponse<Category[]>>('/api/categories');
return response.data.data; // ApiResponse로 감싸져 있으므로 .data.data 반환
};