mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
13 lines
386 B
HTML
13 lines
386 B
HTML
{{- $response := dict -}}
|
|
{{- with try (resources.GetRemote .URL .OPTIONS) -}}
|
|
{{- with .Err -}}
|
|
{{- erroridf "error-get-remote-json" "%s" . -}}
|
|
{{- else with .Value -}}
|
|
{{- $response = .Content | transform.Unmarshal -}}
|
|
{{- else -}}
|
|
{{- erroridf "error-get-remote-json" "Unable to get remote resource %q" $.URL -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
|
|
{{- return $response -}}
|