Files
dougal-software/lib/www/server/api/middleware/linename/properties/get.js
D. Berge 712b20c596 Add API endpoint to retrieve line name properties.
This will be needed by the configuration GUI.
2025-07-09 16:38:41 +02:00

22 lines
370 B
JavaScript

const { linename } = require('../../../../lib/db');
module.exports = async function (req, res, next) {
try {
const payload = req.body;
const properties = await linename.properties.get(req.params.project, payload);
if (properties) {
res.status(200).send(properties);
} else {
res.status(404).send();
}
next();
} catch (err) {
next(err);
}
};