// A-FCSS Simulation API Routes

import { Router } from 'express';
import { fxCbdcSsuSimulatorService } from './fx-cbdc-ssu-simulator.service';

const router = Router();

router.post('/simulate', async (req, res, next) => {
  try {
    const simulation = await fxCbdcSsuSimulatorService.runSimulation(req.body);
    res.json(simulation);
  } catch (error) {
      return next(error);
  }
});

router.get('/simulations/:simulationId', async (req, res, next) => {
  try {
    const simulation = await fxCbdcSsuSimulatorService.getSimulation(req.params.simulationId);
    res.json(simulation);
  } catch (error) {
      return next(error);
  }
});

export default router;

