Skip to content

Commit

Permalink
User Roles
Browse files Browse the repository at this point in the history
  • Loading branch information
mohjaps committed Oct 16, 2022
1 parent c7cbe2e commit ed1b695
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions server/database/config/fakeData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const users = [
last_name: 'سعيد',
email: '[email protected]',
phone_number: '0591000100',
roles: 'admin',
role: 'admin',
hased_password: '$2y$10$MKpnqAAinu5wjl/MYRc3U.XApWTaEexvI4DMaJA.XZTou5lvpSPfu',
},
{
Expand All @@ -14,7 +14,7 @@ const users = [
last_name: 'عمر',
email: '[email protected]',
phone_number: '0591000200',
roles: 'user',
role: 'user',
hased_password: '$2y$10$ROMcXqVNwbepoV6ZdTsTa.6/iego9a72vzSK70pF/S8Oxe/y8tLeO',
},
{
Expand All @@ -23,7 +23,7 @@ const users = [
last_name: 'عبد الله',
email: '[email protected]',
phone_number: '498-722-9258',
roles: 'user',
role: 'user',
hased_password: '$2y$10$NrRa5y454oIukcfU/iNDruP2iEJPm9UGlHqyhZiyd5mY1fy2vULkG',
},
{
Expand All @@ -32,7 +32,7 @@ const users = [
last_name: 'محمد',
email: '[email protected]',
phone_number: '172-408-5906',
roles: 'user',
role: 'user',
hased_password: '$2y$10$dOSPYdqciJCM9U10HiWtCOg9j6jpMD69rMPV/2LI/dDL4SxLATkNG',
},
{
Expand All @@ -41,7 +41,7 @@ const users = [
last_name: 'سليم',
email: '[email protected]',
phone_number: '910-220-7086',
roles: 'user',
role: 'user',
hased_password: '$2y$10$6Y1AcLQDLM7vSSu1A5dj9e61YgCFACEXoBP3NxJ4qX/1SeUUXLFtm',
},
];
Expand Down
2 changes: 1 addition & 1 deletion server/models/User.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const User = sequelize.define(
unique: true,
allowNull: false,
},
roles: {
role: {
type: DataTypes.ENUM('admin', 'user'),
allowNull: false,
},
Expand Down

0 comments on commit ed1b695

Please sign in to comment.