mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-04-13 22:44:11 +08:00
- [ANDROID] [BUGFIX] [DATABASE] - Database listeners now correctly tearing down between RN reloads. (Fixes #1498 #1611 #1609) - [JS] [BUGFIX] [DATABASE] - Fixed an issue where `Reference.toString()` incorrectly contains `//` instead of `/` when joining the parent and child paths. - [JS] [BUGFIX] [DATABASE] - Rework `.push()` behaviour to match WebSDK and correctly return a Reference instance in all scenarios. (Fixes #893 #1464 #1572) - [JS] [ENHANCEMENT] [UTILS] - Added a `firebase.utils().database.cleanup()` utility method which removes all database listeners.
20 lines
472 B
JavaScript
20 lines
472 B
JavaScript
const CONTENTS = require('./content');
|
|
|
|
module.exports = {
|
|
CONTENTS,
|
|
setDatabaseContents() {
|
|
const database = firebaseAdmin.database();
|
|
return Promise.all([
|
|
database.ref('tests/types').set(CONTENTS.DEFAULT),
|
|
database.ref('tests/priority').setWithPriority(
|
|
{
|
|
foo: 'bar',
|
|
},
|
|
666
|
|
),
|
|
database.ref('tests/query').set(CONTENTS.QUERY),
|
|
database.ref('tests/issues').set(CONTENTS.ISSUES),
|
|
]);
|
|
},
|
|
};
|