import apiClient from "./apiClient";
import {Product} from "../types/product";

const router = '/barcode';

const barcodeApi = {
    searchProducts: async (barcode: string): Promise<Product[]> => {
        let response = await apiClient.get(`${router}/searchProducts?barcode=${barcode}`);
        return response.data;
    }
}

export default barcodeApi;