import { request } from '../axios.config' ; import { ListResponse } from '@/client/types/response/list.response' ; import { Category } from '@/client/types/category.interface' ; interface UpdateCategory { category_id : number ; name ? : string ; picture ? : string ; desc ? : string ; } export const user = { getList ( params ) { return request . get ( '/category/user/list' , { params } ) ; } , createCategory ( postData ) { return request . post ( '/category/user/create-category' , postData ) ; } , deleteCategory ( categoryId ) { return request . get ( '/category/user/delete-category' , { params : { category_id : categoryId , } , } ) ; } , updateCategory ( data ) { return request . post ( '/category/user/update-category' , data ) ; } } ;