add structure for api queries

This commit is contained in:
sakrecoer 2025-04-06 22:46:07 +02:00
parent c608a13433
commit c7bcf4383d
2 changed files with 14 additions and 1 deletions

View file

@ -4,7 +4,7 @@
{{ end }} {{ end }}
{{ define "main" }} {{ define "main" }}
{{ partial "body/gang.html" . }}
{{ end }} {{ end }}
{{ define "footer"}} {{ define "footer"}}

View file

@ -0,0 +1,13 @@
{{/* prebuild/layouts/index.html */}}
{{ $url := "https://s.basspistol.org/api/pinned-users" }}
{{ $opts := dict
"method" "post"
"body" `{"complete": true}`
"headers" (dict "Content-Type" "application/json")
}}
{{ with resources.GetRemote $url $opts }}
{{ $monsters := unmarshal .Content }}
{{ range $monsters }}
I love {{ .username }} <br />
{{ end }}
{{ end }}