From eff4bdb6c25c1f3352313e0a3b0a6c4d8cefa6d9 Mon Sep 17 00:00:00 2001 From: Tom Coombs Date: Thu, 15 Aug 2024 19:33:04 -0400 Subject: [PATCH] added vatusa create solo to api --- controllers/TrainingController.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/controllers/TrainingController.js b/controllers/TrainingController.js index ece0bd3..0787962 100644 --- a/controllers/TrainingController.js +++ b/controllers/TrainingController.js @@ -435,6 +435,10 @@ async (req, res) => { towersoloExpiration: req.body.expDate, soloPosition: req.body.position }); + + if (pos === 'APP' || pos === 'CTR') + await axios.post(`https://api.vatusa.net/v2/solo?cid=${req.params.id}&position=${req.body.position}&expDate=${towersoloExpiration}&apikey=${process.env.VATUSA_API_KEY}`) + return res.json(res.stdRes); } catch(e) { req.app.Sentry.captureException(e);