diff options
author | Daniil Yarancev <21169548+Yardanico@users.noreply.github.com> | 2017-10-13 22:43:54 +0300 |
---|---|---|
committer | Daniil Yarancev <21169548+Yardanico@users.noreply.github.com> | 2017-10-14 15:49:53 +0300 |
commit | e29e6ec76ee96424e5664d41a9c311c74d210cc6 (patch) | |
tree | 43363fda9b848518b3c3b5066c9b1c8b3e43b313 /web | |
parent | 1dc6caea6b449a0d4e9334ff19aa7d6484c3528f (diff) | |
download | Nim-e29e6ec76ee96424e5664d41a9c311c74d210cc6.tar.gz |
[JSON] getBVal -> getBool; getFNum -> getFloat
Diffstat (limited to 'web')
-rw-r--r-- | web/bountysource.nim | 8 |
1 files changed, 4 insertions, 4 deletions
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) |