add cause and region as org and creating an org

This commit is contained in:
Arjun Patel
2019-01-27 22:46:49 -08:00
parent 60590906a0
commit e77b31a8f2
5 changed files with 90 additions and 31 deletions
+11
View File
@@ -1,5 +1,6 @@
const express = require('express'),
router = express.Router(),
checkAuth = require('../middleware/check-auth'),
roles = require('../helpers/roles');
const controllers = require('../controllers/organization');
@@ -7,4 +8,14 @@ const controllers = require('../controllers/organization');
// POST Signup route
router.post('/', controllers.organization.create);
// POST add cause
router.post('/cause', checkAuth(roles.ORGANIZATION), controllers.cause.create);
// POST add region
router.post(
'/region',
checkAuth(roles.ORGANIZATION),
controllers.region.create
);
module.exports = router;