add option to regenerate comments

This commit is contained in:
Jonas Leder 2022-03-14 15:37:35 +01:00
parent 97158b5f0c
commit 7fe912b172
No known key found for this signature in database
GPG key ID: 8A53DD45A7D7B44B

View file

@ -16,6 +16,7 @@ class commentsDisplay extends HTMLElement {
body: graphql,
};
let comments = (await (await fetch("http://localhost:1234/API/graphql.php", requestOptions)).json()).data.comments;
this.innerHTML = "";
comments.forEach((element) => {
const h3 = document.createElement("h3");
h3.classList.add("commentTitle");