old_contents: import { index } from "../../cache/data";
  
  export default (req, res) => {
    const results = index.filter(
      (e) =>
        e.title?.toLowerCase().includes(req.query.q) ||
        e?.slug.includes(req.query.q)
    );
    res.statusCode = 200;
    res.setHeader("Content-Type", "application/json");
    res.end(JSON.stringify({ results }));
  };
  
new_contents: import { index } from "../../cache/data";
  
  export default (req, res) => {
    const results = index.filter(
      (e) =>
        e.title?.toLowerCase().includes(req.query.q.toLowerCase()) ||
        e?.slug.includes(req.query.q)
    );
    res.statusCode = 200;
    res.setHeader("Content-Type", "application/json");
    res.end(JSON.stringify({ results }));
  };
  
subject: fix case sensitivity in titles