summary refs log tree commit diff stats
path: root/web
diff options
context:
space:
mode:
authorDaniil Yarancev <21169548+Yardanico@users.noreply.github.com>2017-10-13 22:43:54 +0300
committerDaniil Yarancev <21169548+Yardanico@users.noreply.github.com>2017-10-14 15:49:53 +0300
commite29e6ec76ee96424e5664d41a9c311c74d210cc6 (patch)
tree43363fda9b848518b3c3b5066c9b1c8b3e43b313 /web
parent1dc6caea6b449a0d4e9334ff19aa7d6484c3528f (diff)
downloadNim-e29e6ec76ee96424e5664d41a9c311c74d210cc6.tar.gz
[JSON] getBVal -> getBool; getFNum -> getFloat
Diffstat (limited to 'web')
-rw-r--r--web/bountysource.nim8
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)