enable disable and enable monthly grant

This commit is contained in:
Arjun Patel
2019-04-21 23:25:21 -07:00
parent 663759f56b
commit 522a35b104
3 changed files with 72 additions and 39 deletions
+10 -4
View File
@@ -28,12 +28,18 @@ router.get('/grants/', checkAuth(roles.DONOR), grant.getGrantsByDonorId);
* */
router.post('/grants/', checkAuth(roles.DONOR), grant.createGrant);
// DELETE a grant of a donor
// Cancel Monthly Payment for a grant of a donor
router.delete(
'/grants/',
'/grants/monthly/:grant_id',
checkAuth(roles.DONOR),
stripe.deleteGrant,
grant.deleteGrant
grant.cancelMonthlyGrant
);
// Enable Monthly Payment for a grant of a donor
router.post(
'/grants/monthly/:grant_id',
checkAuth(roles.DONOR),
grant.enableMonthlyGrant
);
// POST to get suggested organizations to distribute to