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