import stockService from '../services/stockService.js';

export const getInventory = async (req, res, next) => {
  try {
    const result = await stockService.getInventory(req.query);
    res.json({ success: true, data: result });
  } catch (error) {
    next(error);
  }
};

export const getStockHistory = async (req, res, next) => {
  try {
    const result = await stockService.getStockHistory(req.query);
    res.json({ success: true, data: result });
  } catch (error) {
    next(error);
  }
};
