import { Router, json as jsonMiddleware } from "express";
import { getTests } from "../database/queries/catalog.js";
const router = Router();

const maxSize = 1024 * 1024 * 100; // 100MB

// Apply Middlewares
router.use(jsonMiddleware({ limit: maxSize }));

// Get Routes
router.get("/tests", async (req, res) => {
  const tests = await getTests();
  res.json(tests);
});

// Post Routes
router.post("/update", (req, res) => {
  // Update All Tests
  res.sendStatus(200);
});

export default router;
