refactoring models and create grant to async await

This commit is contained in:
Arjun Patel
2019-03-16 23:49:11 -07:00
parent e5c204890e
commit 5587c296e4
6 changed files with 97 additions and 79 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ module.exports = models => {
donor.hasMany(Grant, { foreignKey: 'donor_id' });
Grant.belongsToMany(Organization, {
through: 'grants_organizations',
through: 'Grant_Organization',
foreignKey: 'grant_id',
otherKey: 'organization_id'
});