added roles with checking in middleware

- still need signup for orgs
- login for admin
This commit is contained in:
Arjun Patel
2019-01-26 20:23:06 -08:00
parent 794980ff61
commit 2bf26fccbf
13 changed files with 111 additions and 29 deletions
+15
View File
@@ -0,0 +1,15 @@
const express = require('express'),
router = express.Router(),
checkAuth = require('../middleware/check-auth'),
roles = require('../helpers/roles');
const controllers = require('../controllers/admin');
// PUT Manual verification of a charity
router.put(
'/org/:charity_id',
checkAuth(roles.ADMIN),
controllers.organization.verifyOrg
);
module.exports = router;