import type { Request, Response } from "express";
// import fs from "fs";
// import path from "path";
import { quotes } from "../utils/quotes.ts";

// const quotesPath = path.join(process.cwd(), "server", "quotes.json");
// const quotes = JSON.parse(fs.readFileSync(quotesPath, "utf8"));

export const getRandomQuote = (req: Request, res: Response) => {
    const quote = quotes[Math.floor(Math.random() * quotes.length)];
    return res.status(200).json({ message: "Quote fetched successfully", quote });
};
