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

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