* Writes a new comment for the given post.
( postId: string, username: string, uid: string, text: string, )
| 330 | * Writes a new comment for the given post. |
| 331 | */ |
| 332 | function createNewComment( |
| 333 | postId: string, |
| 334 | username: string, |
| 335 | uid: string, |
| 336 | text: string, |
| 337 | ) { |
| 338 | push(ref(database, 'post-comments/' + postId), { |
| 339 | text: text, |
| 340 | author: username, |
| 341 | uid: uid, |
| 342 | }); |
| 343 | } |
| 344 | |
| 345 | /** |
| 346 | * Updates the starred status of the post. |