import { Router } from 'express'
import bodyParser from 'body-parser'
import Decision from './classes/Decision.js'
var router = Router()

router.use(bodyParser.urlencoded({ extended: true }))

router.post('/createDecision', function(req, res) {
  // TODO These 4 fields (IUN, Version, unitIds, organizationId) should be set
  // by the current implementation of Diavgeia
  new Decision(req.body,'60Β3ΩΡΙ-ΒΝ3','b4ae1411-f81d-437b-9c63-a8b7d4ed866b',['6105'],'93302').generateN3()
})

export default router
@@ -472,16 +472,45 @@
 ateN3()%0A
+  res.redirect('/?success');%0A
 %7D)%0A%0Aexpo

Return success param on successful decision upload