Skip to content

Commit 9bdf357

Browse files
authored
adding missing code in a snippet (#288)
1 parent 509769a commit 9bdf357

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

database-next/read-and-write.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ function socialSingleValueRead() {
7474
}
7575

7676
function writeNewPost_wrapped() {
77+
// [START rtdb_social_write_fan_out]
7778
const { getDatabase, ref, child, push, update } = require("firebase/database");
7879

79-
// [START rtdb_social_write_fan_out]
8080
function writeNewPost(uid, username, picture, title, body) {
8181
const db = getDatabase();
8282

snippets/database-next/read-and-write/rtdb_social_write_fan_out.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
// 'npm run snippets'.
66

77
// [START rtdb_social_write_fan_out_modular]
8+
import { getDatabase, ref, child, push, update } from "firebase/database";
9+
810
function writeNewPost(uid, username, picture, title, body) {
911
const db = getDatabase();
1012

0 commit comments

Comments
 (0)