// src/api/deal/voteDeal.ts
import instance from "../axiosInstance"

export async function voteDeal(dealId: number, type: "UP" | "DOWN") {
  try {
    const { data } = await instance.post("/deal-votes", {
      dealId,
      voteType: type,
    })
    return data
  } catch (error) {
    console.error("Vote hatası:", error)
    throw error
  }
}
