// Загрузка категорий продукта
const pool = require("./connect");

const queryString = "SELECT name, types FROM product_categories WHERE status=1";

export default function handler(req, res)  {
    pool.getConnection(function(err, conn) {
        // Do something with the connection
        conn.query(queryString , function(err, rows) {
            res.status(200).json(rows);
         });
        // Don't forget to release the connection when finished!
        pool.releaseConnection(conn);
     })
}