server/controllers/parking.js
/**
 * Create new Parking register
 * @returns {Parking}
 */
Create new Parking register
@returns {Parking}
Create new Parking register @returns { Parking }
function create(req, res, next) {
  const { numeroCelda, placa, fechaEntrada } = req.body;
  const parking = new Parking({
    numeroCelda,
    placa,
    fechaEntrada
  });
  parking.save()
    .then(savedParking => res.json(savedParking))
    .catch(e => next(e));
}
function create ( req , res , next ) { const { numeroCelda , placa , fechaEntrada } = req . body ; const parking = new Parking ( { numeroCelda , placa , fechaEntrada } ) ; parking . save ( ) . then ( savedParking => res . json ( savedParking ) ) . catch ( e => next ( e ) ) ; }
Create new Parking register
 @returns {Parking}
Create new Parking register @returns { Parking }