Skip to content
This repository was archived by the owner on Apr 20, 2018. It is now read-only.

Commit 6f13d13

Browse files
committed
Updating examples. Closes #24
1 parent 5645c37 commit 6f13d13

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

examples/authorization.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ var feathers = require('feathers');
55
var hooks = require('../lib/hooks');
66

77
var app = feathers()
8+
.configure(feathers.rest())
89
.configure(hooks())
910
.use(function(req, res, next) {
1011
// Just some dummy user. In the real-world, for example using
@@ -44,7 +45,7 @@ var app = feathers()
4445
});
4546

4647
//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');
4849

4950
// This `before` hook checks if a user is set
5051
todoService.before({

examples/timestamp.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ var hooks = require('../lib/hooks');
55
var _ = require('lodash');
66

77
var app = feathers()
8+
.configure(feathers.rest())
89
.configure(hooks())
910
.use('/todos', {
1011
id: 0,
@@ -47,7 +48,7 @@ app.listen(8080);
4748
console.log('App listening on 127.0.0.1:8080');
4849

4950
// 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');
5152

5253
// Register a hook that adds a createdAt and updatedAt timestamp
5354
todoService.before({

0 commit comments

Comments
 (0)