From 20d404b521b61d008da0fd540090ba1c0f470f4d Mon Sep 17 00:00:00 2001 From: JP Hastings-Spital Date: Mon, 12 Feb 2024 21:59:37 +0000 Subject: [PATCH] Temporary fix for val.town change They [deprecated their `run` API](https://docs.val.town/api/run/) so I've hardcoded some stats here until I can fix this. --- layouts/shortcodes/donations.html | 4 +++- todo.md | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/layouts/shortcodes/donations.html b/layouts/shortcodes/donations.html index 6b44e8d4..daca1e46 100644 --- a/layouts/shortcodes/donations.html +++ b/layouts/shortcodes/donations.html @@ -1,4 +1,6 @@ -{{ $donations := getJSON "https://api.val.town/v1/run/byjp.donations" }} +{{/* $donations := getJSON "https://api.val.town/v1/run/byjp.donations" */}} +{{/* Having to hard-code for now, as I need to redesign the val.town val, as their API has changed! */}} +{{ $donations := dict "totalGBP" 101.36 "currencyCount" 2 }}

Friends have donated £{{ div (math.Round (mul $donations.totalGBP 100)) 100 }} (in {{ $donations.currencyCount }} currencies) to worthy causes in thanks. Thank you!