Fix ESLint error: rename 'module' variable to avoid @next/next/no-assign-module-variable

Made-with: Cursor
This commit is contained in:
Talal Sharabi
2026-03-14 16:54:06 +04:00
parent 5fb82abafd
commit 3c580498d3

View File

@@ -9,10 +9,10 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
if (req.method !== "POST") return res.status(404).json({ok: false});
if (!req.session.token) return res.status(401).json({ok: false});
const module = req.query.module as string;
const examModule = req.query.module as string;
try {
const resp = await fetch(`${ODOO_URL}/api/exam/${module}`, {
const resp = await fetch(`${ODOO_URL}/api/exam/${examModule}`, {
method: "POST",
headers: {
Authorization: `Bearer ${req.session.token}`,