fix(assets): strip internal full_count column from list response

The window function COUNT(*) OVER() leaks `full_count` on every row.
Strip it before sending so callers only see actual asset fields.
This commit is contained in:
Zac Gaetano 2026-05-18 23:44:14 -04:00
parent 660afb94bb
commit e6314be92d

View file

@ -82,7 +82,7 @@ router.get('/', async (req, res, next) => {
const total = result.rows.length > 0 ? parseInt(result.rows[0].full_count, 10) : 0; const total = result.rows.length > 0 ? parseInt(result.rows[0].full_count, 10) : 0;
res.json({ res.json({
assets: result.rows, assets: result.rows.map(({ full_count, ...rest }) => rest),
total, total,
}); });
} catch (err) { } catch (err) {