Skip to content
Prev Previous commit
Next Next commit
Fix prettier issue.
  • Loading branch information
taeold committed Aug 21, 2024
commit 934263c573723b58fc7130379685b952901c9f3e
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,13 @@ _Please avoid double posting across multiple channels!_

```js
// functions/index.js
const {onValueCreated} = require("firebase-functions/database");
const { onValueCreated } = require("firebase-functions/database");
const logger = require("firebase-functions/logger");
const notifyUsers = require("./notify-users");

exports.newPost = onValueCreated(
{ ref: "/posts/{postId}" },
(event) => {
logger.info("Received new post with ID:", event.params.postId);
return notifyUsers(event.data.val());
exports.newPost = onValueCreated({ ref: "/posts/{postId}" }, (event) => {
logger.info("Received new post with ID:", event.params.postId);
return notifyUsers(event.data.val());
});
```

Expand Down