New API entry that counts the number of pending tests

This commit is contained in:
Gaël Métais
2021-01-24 00:30:28 +00:00
parent 24ad2f45cc
commit b54eb0cca9
+5 -4
View File
@@ -224,10 +224,11 @@ var ApiController = function(app) {
}
});
// Retrieve the list of all runs
/*app.get('/api/runs', function(req, res) {
// NOT YET
});*/
// Counts all pending runs
app.get('/api/runs', function(req, res) {
res.setHeader('Content-Type', 'application/json');
res.send(JSON.stringify({pendingRuns: queue.length()}, null, 2));
});
// Delete one run by id
/*app.delete('/api/runs/:id', function(req, res) {