simulations.js 444 Bytes
Newer Older
abergavenny's avatar
abergavenny committed
1
2
3
4
5
6
7
8
9
10
11
12
13
import express from 'express'
import { checkSchema } from 'express-validator'

import { getSimulation, getSimulations } from '../../controllers/simulations.js'
import asyncHandler from '../../middleware/asyncHandler.js'
import { idSchema } from '../../schemas/index.js'

const router = express.Router()

router.get('/', asyncHandler(getSimulations))
router.get('/:id', checkSchema(idSchema), asyncHandler(getSimulation))

export default router