function writeNewPost(uid, username, picture, title, body) { // A post entry. var postData = { author: username, uid: uid, body: body, title: title, starCount: 0, authorPic: picture }; // Get a key for a new Post. var newPostKey = firebase.database().ref().child(‘posts’).push().key; // Write the new post’s data simultaneously in the posts list and the user’s post list. var updates = {}; updates[‘/posts/’ + newPostKey] = postData; updates[‘/user-posts/’ + uid + ‘/’