fix(ui): resolve dark mode layout gray colors in light-mode browser and fix row index looping on paginated tables

This commit is contained in:
Rafif-Riqullah-Siregar committed 2026-07-16 14:30:23 +07:00
1 parent 46f33eb088
commit 202ecfa485
19 files changed
+374 -34

No files matched your search

+13
View File
@@ -122,6 +122,19 @@ app.get('/api/health', (req, res) => {
});
});
// ─── Global JSON Error Handler ────────────────────────────────────────────────
// Menangkap semua error yang tidak di-handle (termasuk multer, mongoose, dll.)
// dan memastikan response selalu JSON, BUKAN HTML default Express.
// eslint-disable-next-line no-unused-vars
app.use((err, req, res, next) => {
console.error('[Global Error Handler]', err.message || err);
const status = err.status || err.statusCode || 500;
res.status(status).json({
error: err.message || 'Internal server error',
code: err.code || undefined,
});
});
// ─── Start Server ─────────────────────────────────────────────────────────────
// Bind to 127.0.0.1 in production to prevent direct external access to port 3001.
// All external traffic must go through the reverse proxy (Apache/Nginx) at port 80/443.