Fix icons
This commit is contained in:
@@ -36,6 +36,17 @@ function filterArr(arr, fields) {
|
||||
return arr.map(row => filterFields(row, fields));
|
||||
}
|
||||
|
||||
// ── Errors ────────────────────────────────────────────────────────────────────
|
||||
|
||||
app.use((req, res, next) => {
|
||||
res.status(404).json({ error: `Not found: ${req.method} ${req.path}` })
|
||||
})
|
||||
|
||||
app.use((err, req, res, next) => {
|
||||
console.error(`[ERROR] ${req.method} ${req.path}\n${err.stack}`)
|
||||
res.status(500).json({ error: err.message, stack: err.stack })
|
||||
})
|
||||
|
||||
// ── Current ───────────────────────────────────────────────────────────────────
|
||||
|
||||
app.get('/api/current', async (req, res) => {
|
||||
|
||||
Reference in New Issue
Block a user