1.0.2
This commit is contained in:
parent
f4186e4c96
commit
ae5b31184e
3 changed files with 17 additions and 11 deletions
|
@ -1,6 +1,6 @@
|
||||||
# rethink
|
# rethink
|
||||||
|
|
||||||
[![version 1.0.1](https://img.shields.io/badge/pub-1.0.1-brightgreen.svg)](https://pub.dartlang.org/packages/angel_rethink)
|
[![version 1.0.2](https://img.shields.io/badge/pub-1.0.2-brightgreen.svg)](https://pub.dartlang.org/packages/angel_rethink)
|
||||||
[![build status](https://travis-ci.org/angel-dart/rethink.svg?branch=master)](https://travis-ci.org/angel-dart/rethink)
|
[![build status](https://travis-ci.org/angel-dart/rethink.svg?branch=master)](https://travis-ci.org/angel-dart/rethink)
|
||||||
|
|
||||||
RethinkDB-enabled services for the Angel framework.
|
RethinkDB-enabled services for the Angel framework.
|
||||||
|
|
|
@ -127,19 +127,25 @@ class RethinkService extends Service {
|
||||||
|
|
||||||
if (type == 'add') {
|
if (type == 'add') {
|
||||||
// Create
|
// Create
|
||||||
hookedService.fire(HookedServiceEvent.CREATED, newVal);
|
hookedService.fireEvent(
|
||||||
|
hookedService.afterCreated,
|
||||||
|
new HookedServiceEvent(
|
||||||
|
true, null, null, this, HookedServiceEvent.CREATED,
|
||||||
|
result: newVal));
|
||||||
} else if (type == 'change') {
|
} else if (type == 'change') {
|
||||||
// Update
|
// Update
|
||||||
hookedService.fire(HookedServiceEvent.UPDATED, newVal, (e) {
|
hookedService.fireEvent(
|
||||||
e
|
hookedService.afterCreated,
|
||||||
..id = oldVal['id']
|
new HookedServiceEvent(
|
||||||
..data = newVal;
|
true, null, null, this, HookedServiceEvent.UPDATED,
|
||||||
});
|
result: newVal, id: oldVal['od'], data: newVal));
|
||||||
} else if (type == 'remove') {
|
} else if (type == 'remove') {
|
||||||
// Remove
|
// Remove
|
||||||
hookedService.fire(HookedServiceEvent.CREATED, oldVal, (e) {
|
hookedService.fireEvent(
|
||||||
e.id = oldVal['id'];
|
hookedService.afterCreated,
|
||||||
});
|
new HookedServiceEvent(
|
||||||
|
true, null, null, this, HookedServiceEventREMOVED,
|
||||||
|
result: oldVal, id: oldVal['id']));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
name: angel_rethink
|
name: angel_rethink
|
||||||
version: 1.0.1
|
version: 1.0.2
|
||||||
description: RethinkDB-enabled services for the Angel framework.
|
description: RethinkDB-enabled services for the Angel framework.
|
||||||
author: Tobe O <thosakwe@gmail.com>
|
author: Tobe O <thosakwe@gmail.com>
|
||||||
environment:
|
environment:
|
||||||
|
|
Loading…
Reference in a new issue