You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
561 B
17 lines
561 B
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
|
|
import { OkPacket, RowDataPacket } from "mysql2";
|
|
import type { NextApiRequest, NextApiResponse } from 'next';
|
|
//import {BasicOrder, Order, OrderWithDetails} from "../../server/types/order";
|
|
import { db } from "../../server/db/connect";
|
|
|
|
type Data = {
|
|
queryString: string,
|
|
}
|
|
|
|
export default function handler(
|
|
req: NextApiRequest,
|
|
res: NextApiResponse<Data>)
|
|
{
|
|
const queryString = "SELECT * FROM products";
|
|
res.status(200).json({ queryString })
|
|
};
|
|
|