import express from "express";
import connection from "../db.js";

const router = express.Router();

router.get("/reset", async (req, res) => {
  try {
    await connection.query("CALL InitDb;", []);
  } catch (err) {
    console.log(err);
    res.status(400).json({ message: "Error" });
  }
  res.status(200).json({ message: "Success" });
});

export default router;
