aboutsummaryrefslogtreecommitdiff
path: root/cgi
diff options
context:
space:
mode:
authorNat Lasseter <user@4574.co.uk>2025-03-10 20:46:56 +0000
committerNat Lasseter <user@4574.co.uk>2025-03-10 20:46:56 +0000
commitbaf5881387e4201af5297864acdb08520f85565d (patch)
tree0dbe5a8af4d62a128aed824a177b6d6d4df6f54f /cgi
parent02d7497e2f1d2062a98a8fa3da83fcc6079829e9 (diff)
Remove sensitive uprn
Diffstat (limited to 'cgi')
-rw-r--r--cgi/home.cgi3
1 files changed, 2 insertions, 1 deletions
diff --git a/cgi/home.cgi b/cgi/home.cgi
index fe567b2..603e7cf 100644
--- a/cgi/home.cgi
+++ b/cgi/home.cgi
@@ -3,7 +3,8 @@ require "net/http"
require "time"
def next_collection
- uri = URI("https://waste-api.york.gov.uk/api/Collections/GetBinCollectionDataForUprn/***REMOVED***")
+ uprn = File.read("../uprn").strip
+ uri = URI("https://waste-api.york.gov.uk/api/Collections/GetBinCollectionDataForUprn/#{uprn}")
resp = JSON.parse(Net::HTTP.get(uri))["services"].select { |c| Time.parse(c["nextCollection"]) > Time.now }.sort { |a, b| Time.parse(a["nextCollection"]) <=> Time.parse(b["nextCollection"]) }
out = ""