load sitekey from graphql
This commit is contained in:
parent
7509544b00
commit
d1cda0ba2f
1 changed files with 9 additions and 1 deletions
|
@ -8,7 +8,15 @@ class newComment extends HTMLElement {
|
|||
}
|
||||
|
||||
async setupForm() {
|
||||
let sitekey = await (await fetch("/API/config.php?name=sitekey")).text();
|
||||
var graphql = JSON.stringify({
|
||||
query: "query {\r\n sitekey\r\n}"
|
||||
})
|
||||
var requestOptions = {
|
||||
method: 'POST',
|
||||
body: graphql,
|
||||
};
|
||||
|
||||
let sitekey = (await (await fetch("/API/graphql.php", requestOptions)).json()).data.sitekey;
|
||||
|
||||
let script = document.createElement('script');
|
||||
script.src = "https://hCaptcha.com/1/api.js";
|
||||
|
|
Loading…
Reference in a new issue