import api from './api'

export async function createProduct(payload) {
  const res = await api.post('/api/products', payload)
  return res.data
}

export async function getAllProducts() {
  const res = await api.get('/api/products')
  return res.data
}


export async function getProductById(id) {
  const res = await api.get(`/api/products/${id}`)
  return res.data
}

