mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 11:37:08 +00:00
Add API middleware for returning QC results
This commit is contained in:
14
lib/www/server/api/middleware/qc/results/get.js
Normal file
14
lib/www/server/api/middleware/qc/results/get.js
Normal file
@@ -0,0 +1,14 @@
|
||||
|
||||
const { qc } = require('../../../../lib/db');
|
||||
|
||||
module.exports = async function (req, res, next) {
|
||||
|
||||
try {
|
||||
res.status(200).json(await qc.results.get(req.params.project, req.params.sequence, req.query, req.user.role));
|
||||
} catch (err) {
|
||||
next(err);
|
||||
return;
|
||||
}
|
||||
next();
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user