v1.0
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import pool from '../db/index.js';
|
||||
|
||||
export async function getServiceOptions(req, res) {
|
||||
try {
|
||||
const { rows } = await pool.query(
|
||||
'SELECT id, code, label, price_chf, price_type FROM service_options WHERE active = true ORDER BY id'
|
||||
);
|
||||
res.json(rows);
|
||||
} catch (err) {
|
||||
res.status(500).json({ error: err.message });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user