MCPcopy Create free account
hub / github.com/firebase/quickstart-js / createNewComment

Function createNewComment

database/scripts/main.ts:332–343  ·  view source on GitHub ↗

* Writes a new comment for the given post.

(
  postId: string,
  username: string,
  uid: string,
  text: string,
)

Source from the content-addressed store, hash-verified

330 * Writes a new comment for the given post.
331 */
332function 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.

Callers 1

createPostElementFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected