- Add get_status() SQL and /api/status route; load stale state on login - Replace polling with immediate client-side stale tracking via callbacks - Amber status bar with per-item Generate buttons for sources and stacks - Pivot: add stack selector to view any dfv.stack view via Perspective - Stack views: DROP CASCADE, add id to source views, per-source balance columns - net_balance = sum(all amounts) + total_offset guarantees chase+dcard=net per row - CLAUDE.md: document correct dedup spec (within-batch duplicates always allowed) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
15 lines
357 B
JavaScript
15 lines
357 B
JavaScript
const express = require('express');
|
|
|
|
module.exports = (pool) => {
|
|
const router = express.Router();
|
|
|
|
router.get('/', async (req, res, next) => {
|
|
try {
|
|
const result = await pool.query('SELECT get_status() AS result');
|
|
res.json(result.rows[0].result);
|
|
} catch (err) { next(err); }
|
|
});
|
|
|
|
return router;
|
|
};
|