pulyaevskiy / firebase-functions-interop

Firebase Functions Interop Library for Dart.
BSD 3-Clause "New" or "Revised" License
191 stars 52 forks source link

onCreate is calling native onWrite #5

Closed tomas259 closed 6 years ago

tomas259 commented 6 years ago

in file firebase_functions_interop.dart ln 168

js.CloudFunction onCreate(FutureOr handler(DatabaseEvent event), [Serializer serializer]) { dynamic wrapper(js.Event event) { return _handleEvent(event, handler, serializer); }

return nativeInstance.onWrite(allowInterop(wrapper));

}

shold be return nativeInstance.onCreate(allowInterop(wrapper));

same for onDelete and onUpdate

pulyaevskiy commented 6 years ago

Thanks for reporting!

This should be fixed now and available in 0.1.0-beta.2 https://pub.dartlang.org/packages/firebase_functions_interop/versions/0.1.0-beta.2

Feel free to file a new issue if something is not working for you still.