Updated user model and repo

This commit is contained in:
Alexis
2021-01-18 22:06:36 +01:00
parent 413d458a80
commit 410a58fc09
2 changed files with 228 additions and 32 deletions

View File

@@ -6,7 +6,7 @@ require('./spell-model');
let User = bookshelf.Model.extend({
tableName: 'user',
hidden: [ 'password' ],
hidden: [ 'password', 'role_id' ],
role() {
return this.belongsTo( 'Role' );
},
@@ -15,4 +15,4 @@ let User = bookshelf.Model.extend({
}
})
module.exports = bookshelf.model('User', User)
module.exports = bookshelf.model( 'User', User )