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
+24
View File
@@ -6,6 +6,30 @@ module.exports = (sequelize, DataTypes) => {
autoIncrement: true
},
name: { type: DataTypes.STRING, allowNull: false },
first_name: {
type: DataTypes.STRING,
allowNull: false
},
last_name: {
type: DataTypes.STRING,
allowNull: false
},
email: {
type: DataTypes.STRING,
validate: {
isEmail: true
},
allowNull: false
},
password: {
type: DataTypes.STRING,
allowNull: false
},
verified: {
type: DataTypes.BOOLEAN,
allowNull: false,
defaultValue: false
},
short_description: DataTypes.STRING,
primary_cause: { type: DataTypes.STRING, allowNull: false },
primary_region: { type: DataTypes.STRING, allowNull: false },