Added authGuard function and its implementations
Also refactored small code mistakes.
This commit is contained in:
@@ -4,10 +4,10 @@ require('./role-model')
|
||||
|
||||
let Permission = bookshelf.Model.extend({
|
||||
tableName: 'permission',
|
||||
hidden: [ 'id' ],
|
||||
hidden: ['id'],
|
||||
role() {
|
||||
return this.belongsToMany( 'Role', 'role_permission' )
|
||||
return this.belongsToMany('Role', 'role_permission')
|
||||
}
|
||||
})
|
||||
|
||||
module.exports = bookshelf.model( 'Permission', Permission );
|
||||
module.exports = bookshelf.model('Permission', Permission);
|
||||
Reference in New Issue
Block a user