// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
import type { NextApiRequest, NextApiResponse } from 'next'

import Select from "../../db/select";

const sql = "SELECT id, fio FROM user WHERE status=1 ORDER BY user.fio ASC";

export default function handler(
    req: NextApiRequest,
    res: NextApiResponse)  {
    Select(sql, function(data){
        res.status(200).json(data);
    })
}

