const city = await cityRepo.getUsersCity(account.id);
const amount = parseInt(req.body.amount, 10);
+ if(amount < 1) {
+ throw new BadInputError('Please specify an amount > 0', ERROR_CODE.INVALID_AMOUNT);
+ }
const building = await cityRepo.buildingRepository.findBySlug(req.body.building_type);
if(!building) {
const city = await cityRepo.getUsersCity(acct.id);
const amount = parseInt(req.body.amount, 10);
+ if(amount < 1) {
+ throw new BadInputError('Please specify an amount > 0', ERROR_CODE.INVALID_AMOUNT);
+ }
const unit = await cityRepo.unitRepository.findBySlug(req.body.type);
if(!unit) {