File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
1
import { HookContext } from '@feathersjs/feathers' ;
2
- import { authenticate } from '@feathersjs/authentication' ;
3
-
4
2
5
3
export default async ( context : HookContext ) : Promise < boolean > => {
6
4
console . log ( context . params . authenticated ) ;
Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ import isAuthenticated from './isAuthenticated';
4
4
5
5
export default iff (
6
6
isNot ( isAuthenticated ) ,
7
- ( ) => { throw new NotAuthenticated ( 'This endpoint requires auth!' ) }
7
+ ( ) => {
8
+ throw new NotAuthenticated ( 'This endpoint requires auth!' ) ;
9
+ }
8
10
) ;
9
11
Original file line number Diff line number Diff line change 1
1
import _ from 'lodash' ;
2
2
import { HookContext } from '@feathersjs/feathers' ;
3
- import { iff , combine } from 'feathers-hooks-common' ;
3
+ import { iff } from 'feathers-hooks-common' ;
4
4
import isAuthenticated from '../../hooks/isAuthenticated' ;
5
5
6
6
const raiseNewVerifedPolls = async ( context : HookContext ) : Promise < HookContext > => {
@@ -25,7 +25,7 @@ export default {
25
25
after : {
26
26
find : [
27
27
iff ( isAuthenticated , raiseNewVerifedPolls ) ,
28
- iff ( isAuthenticated , lowerOldPolls ) ,
28
+ iff ( isAuthenticated , lowerOldPolls )
29
29
]
30
30
}
31
31
} ;
You can’t perform that action at this time.
0 commit comments