text: import {sql_query} from '../../lib/db'
  
  export default async (req, res) => {
  
      const results = await sql_query("SELECT * FROM products_new WHERE visibility = 'visible' ORDER BY product_name ASC");
  
      if (results.length > 0) {
  
        res.send(JSON.stringify(results))
      } else {
        res.send(JSON.stringify({error: "No products found"}));
      }
    
  };