update Upvote D B
fun updateUpvoteDB(userVal: String?, postKey: String?, postVal: String?, numUpvotes: Int)
Content copied to clipboard
Updates the upvotes of a post on the database.
Parameters
userVal
Username of the user who upvoted or removed their upvote on a post.
postKey
Unique identifier of the post whose upvotes are being toggled.
postVal
Unique identifier of the post to be added or removed from the user's list of upvoted posts.
numUpvotes
Updated number of upvotes of the post.