You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
359 B
JavaScript
13 lines
359 B
JavaScript
5 years ago
|
const router = module.exports = require('express-promise-router')()
|
||
|
const parseJSON = require('body-parser').json()
|
||
|
const db = require('../db')
|
||
|
|
||
|
const validate = require('./middleware/validators')
|
||
|
|
||
|
router.use(require('./middleware/ensureCart'))
|
||
|
|
||
|
router.put('/', async (req, res) => {
|
||
|
const order = await db.order.create(req.cart.uuid);
|
||
|
res.json(order)
|
||
|
})
|