This repository was archived by the owner on Apr 20, 2018. It is now read-only.
File tree 2 files changed +4
-2
lines changed
2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ var feathers = require('feathers');
5
5
var hooks = require ( '../lib/hooks' ) ;
6
6
7
7
var app = feathers ( )
8
+ . configure ( feathers . rest ( ) )
8
9
. configure ( hooks ( ) )
9
10
. use ( function ( req , res , next ) {
10
11
// Just some dummy user. In the real-world, for example using
@@ -44,7 +45,7 @@ var app = feathers()
44
45
} ) ;
45
46
46
47
//Get the wrapped service object (which will have the .before() and .after() methods)
47
- var todoService = app . lookup ( 'todos' ) ;
48
+ var todoService = app . service ( 'todos' ) ;
48
49
49
50
// This `before` hook checks if a user is set
50
51
todoService . before ( {
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ var hooks = require('../lib/hooks');
5
5
var _ = require ( 'lodash' ) ;
6
6
7
7
var app = feathers ( )
8
+ . configure ( feathers . rest ( ) )
8
9
. configure ( hooks ( ) )
9
10
. use ( '/todos' , {
10
11
id : 0 ,
@@ -47,7 +48,7 @@ app.listen(8080);
47
48
console . log ( 'App listening on 127.0.0.1:8080' ) ;
48
49
49
50
// Get the wrapped service object which will be used in the other exapmles
50
- var todoService = app . lookup ( 'todos' ) ;
51
+ var todoService = app . service ( 'todos' ) ;
51
52
52
53
// Register a hook that adds a createdAt and updatedAt timestamp
53
54
todoService . before ( {
You can’t perform that action at this time.
0 commit comments