import type { NextApiRequest, NextApiResponse } from 'next'
import Insert from "../../../server/db/insert";

export default function handler(
    req: NextApiRequest,
    res: NextApiResponse
  ) {
    console.log('in')
    const parm = req.body;
    console.log(parm)
    const sql_userAgent = "INSERT INTO views (id_podcasts, userAgent,ip) VALUES (?,?,?)";
    //const views = [parm, req.headers['user-agent'], req.socket.remoteAddress]
    res.status(200).json(12);
    //Insert(sql_userAgent, views as string[], function(message){
  //    console.log(message);
  //  })
  } 
  