mirror of
https://github.com/9technologygroup/patchmon.net.git
synced 2025-11-11 01:16:12 +00:00
fix(frontend): unused parameters
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import path from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import cors from "cors";
|
||||
import express from "express";
|
||||
import { createProxyMiddleware } from "http-proxy-middleware";
|
||||
import path from "path";
|
||||
import { fileURLToPath } from "url";
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
@@ -26,11 +26,11 @@ app.use(
|
||||
target: BACKEND_URL,
|
||||
changeOrigin: true,
|
||||
logLevel: "info",
|
||||
onError: (err, req, res) => {
|
||||
onError: (err, _req, res) => {
|
||||
console.error("Proxy error:", err.message);
|
||||
res.status(500).json({ error: "Backend service unavailable" });
|
||||
},
|
||||
onProxyReq: (proxyReq, req, res) => {
|
||||
onProxyReq: (_proxyReq, req, _res) => {
|
||||
console.log(`Proxying ${req.method} ${req.path} to ${BACKEND_URL}`);
|
||||
},
|
||||
}),
|
||||
@@ -40,7 +40,7 @@ app.use(
|
||||
app.use(express.static(path.join(__dirname, "dist")));
|
||||
|
||||
// Handle SPA routing - serve index.html for all routes
|
||||
app.get("*", (req, res) => {
|
||||
app.get("*", (_req, res) => {
|
||||
res.sendFile(path.join(__dirname, "dist", "index.html"));
|
||||
});
|
||||
|
||||
|
||||
@@ -529,7 +529,10 @@ const Settings = () => {
|
||||
type="number"
|
||||
value={formData.serverPort}
|
||||
onChange={(e) =>
|
||||
handleInputChange("serverPort", parseInt(e.target.value, 10))
|
||||
handleInputChange(
|
||||
"serverPort",
|
||||
parseInt(e.target.value, 10),
|
||||
)
|
||||
}
|
||||
className={`w-full border rounded-md shadow-sm focus:ring-primary-500 focus:border-primary-500 bg-white dark:bg-secondary-700 text-secondary-900 dark:text-white ${
|
||||
errors.serverPort
|
||||
|
||||
@@ -16,18 +16,18 @@ export default defineConfig({
|
||||
secure: false,
|
||||
configure:
|
||||
process.env.VITE_ENABLE_LOGGING === "true"
|
||||
? (proxy, options) => {
|
||||
proxy.on("error", (err, req, res) => {
|
||||
? (proxy, _options) => {
|
||||
proxy.on("error", (err, _req, _res) => {
|
||||
console.log("proxy error", err);
|
||||
});
|
||||
proxy.on("proxyReq", (proxyReq, req, res) => {
|
||||
proxy.on("proxyReq", (_proxyReq, req, _res) => {
|
||||
console.log(
|
||||
"Sending Request to the Target:",
|
||||
req.method,
|
||||
req.url,
|
||||
);
|
||||
});
|
||||
proxy.on("proxyRes", (proxyRes, req, res) => {
|
||||
proxy.on("proxyRes", (proxyRes, req, _res) => {
|
||||
console.log(
|
||||
"Received Response from the Target:",
|
||||
proxyRes.statusCode,
|
||||
|
||||
Reference in New Issue
Block a user