Add simple prediction comparison
This commit is contained in:
@ -16,5 +16,11 @@ router.post('/prediction/new', (req, res, next) => {
|
||||
});
|
||||
});
|
||||
|
||||
router.post('/prediction/compare', async (req, res, next) => {
|
||||
const valA = (await PredictionModel.findOne({ name: req.body.nameA })).value;
|
||||
const valB = (await PredictionModel.findOne({ name: req.body.nameB })).value;
|
||||
res.json(valB - valA);
|
||||
});
|
||||
|
||||
|
||||
module.exports = router;
|
||||
|
Reference in New Issue
Block a user