|
|
@ -57,10 +57,7 @@ |
|
|
|
|
|
|
|
document.getElementById("load-comment").addEventListener("click", function() { |
|
|
|
document.getElementById("load-comment").innerHTML = "Loading"; |
|
|
|
require('dotenv').config(); |
|
|
|
const key = process.env.API_KEY; |
|
|
|
const headers = { 'Authorization': '${key}' }; // auth header with bearer token |
|
|
|
fetch('https://{{ .Site.Params.comment.fediverse.host }}/api/v1/statuses/{{ .Page.Params.comments.id }}/context', { headers }) |
|
|
|
fetch('http://localhost:7777/api/v1/statuses/{{ .Page.Params.comments.id }}/context') |
|
|
|
.then(function(response) { |
|
|
|
return response.json(); |
|
|
|
}) |
|
|
|