Fixed example

This commit is contained in:
thosakwe 2016-06-23 16:00:45 -04:00
parent 3b34578cb6
commit 91b0b9df0e

View file

@ -28,7 +28,7 @@ class User extends Model {
Db db = new Db('mongodb://localhost:27017/local');
await db.open();
app.use('/api/users', new MongoTypedService<User>());
app.use('/api/users', new MongoTypedService<User>(db.collection("users")));
app.service('api/users').afterCreated.listen((HookedServiceEvent event) {
print("New user: ${event.result}");