import { axiosClient } from '@/api/axiosClient'
import type { UpdateRubroRequest, Rubro } from '../types'

export async function updateRubro(id: number, payload: UpdateRubroRequest): Promise<Rubro> {
  const response = await axiosClient.put<Rubro>(`/api/v1/admin/rubros/${id}`, payload)
  return response.data
}
