This commit is contained in:
lejay
2026-02-13 00:21:53 +01:00
parent 81d2412835
commit 6923c319a1
85 changed files with 17836 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
import pool from '../db/index.js';
export async function getBlockTypes(req, res) {
try {
const { rows } = await pool.query(
'SELECT id, code, label, base_price_chf, width_min_mm, width_max_mm FROM block_types WHERE active = true ORDER BY id'
);
res.json(rows);
} catch (err) {
res.status(500).json({ error: err.message });
}
}