formatting

This commit is contained in:
Arjun Patel
2019-02-19 23:11:20 -08:00
parent 2545fdda25
commit a7de8b3480
+3 -3
View File
@@ -9,7 +9,7 @@ exports.create = (req, res, next) => {
const { name, amount, monthly, causes, regions, organizations } = req.body; const { name, amount, monthly, causes, regions, organizations } = req.body;
return sequelize return sequelize
.transaction(function(t) { .transaction(function (t) {
return Grant.create( return Grant.create(
{ {
donor_id, donor_id,
@@ -28,7 +28,7 @@ exports.create = (req, res, next) => {
]).then(result => grant); ]).then(result => grant);
}); });
}) })
.then(function(grants) { .then(function (grants) {
// transaction committed // transaction committed
// res.status(201).json({ // res.status(201).json({
// grant, // grant,
@@ -38,7 +38,7 @@ exports.create = (req, res, next) => {
next(grants.dataValues); next(grants.dataValues);
return null; return null;
}) })
.catch(function(error) { .catch(function (error) {
// transaction rollback // transaction rollback
next(error); next(error);
}); });