From e29e6ec76ee96424e5664d41a9c311c74d210cc6 Mon Sep 17 00:00:00 2001 From: Daniil Yarancev <21169548+Yardanico@users.noreply.github.com> Date: Fri, 13 Oct 2017 22:43:54 +0300 Subject: [JSON] getBVal -> getBool; getFNum -> getFloat --- web/bountysource.nim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'web') diff --git a/web/bountysource.nim b/web/bountysource.nim index 5dfdb4497..abb29514e 100644 --- a/web/bountysource.nim +++ b/web/bountysource.nim @@ -53,7 +53,7 @@ proc processSupporters(supporters: JsonNode) = echo("Found ", supporters.elems.len, " named sponsors.") supporters.elems.sort( - (x, y) => cmp(y["alltime_amount"].getFNum, x["alltime_amount"].getFNum) + (x, y) => cmp(y["alltime_amount"].getFloat, x["alltime_amount"].getFloat) ) @@ -113,7 +113,7 @@ when isMainModule: if url.len > 0 and not url.startsWith("http"): url = "http://" & url - let amount = supporter["monthly_amount"].getFNum() + let amount = supporter["monthly_amount"].getFloat() # Only show URL when user donated at least $5. if amount < 5: url = "" @@ -126,10 +126,10 @@ when isMainModule: discard # TODO let sponsor = Sponsor(name: name, url: url, logo: logo, amount: amount, - allTime: supporter["alltime_amount"].getFNum(), + allTime: supporter["alltime_amount"].getFloat(), since: parse(supporter["created_at"].getStr, "yyyy-MM-dd'T'hh:mm:ss") ) - if supporter["monthly_amount"].getFNum > 0.0: + if supporter["monthly_amount"].getFloat > 0.0: activeSponsors.add(sponsor) else: inactiveSponsors.add(sponsor) -- cgit 1.4.1-2-gfad0