Advertisement
Tenchus1

Untitled

Jul 19th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function subirPost()
  2. {
  3.     let Post = {};
  4.     Post.post = document.getElementById("MuroContent").value;
  5.     var d = new Date();
  6.     Post.date = d.toLocaleDateString('en-US');
  7.     let user = firebase.auth().currentUser;
  8.     var ref = firebase.database().ref("Muro/"+ user.uid + "/Posts");
  9.     var newRef = ref.push();
  10.     console.log(Post.date);
  11.     newRef.set(Post);
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement