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
+1 -1
View File
@@ -34,7 +34,7 @@ exports.create = (req, res, next) => {
// Find grants with causes, regions, and organizations by donor_id
exports.findByDonorId = (req, res, next) => {
const donor_id = req.user_data.id;
const donor_id = req.user.id;
Grant.findAll({
where: {