some nice additions

This commit is contained in:
sava
2020-03-28 00:22:28 +01:00
parent 023c9c02f3
commit 1d9e4fa598
5 changed files with 26 additions and 19 deletions

View File

@@ -9,7 +9,7 @@ var list = function() {
html = '<br/>'
query.forEach(function(doc) {
book = doc.data()
html += book.toHtml()
html += book.toHtml(firebase.auth().currentUser)
})
$('#kommentarer').html(html)
}).catch(function(error) {
@@ -34,11 +34,14 @@ var add = function() {
})
}
var remove = function(id) {
db.collection("gjestebok").doc(id)
.delete().then(function() {
list()
}).catch(function(error) {
alert("Error removing document: ", error)
})
}
list()
/*
$(document).ready(function() {
list(firebase.auth().currentUser)
})
*/