diff src/pumpio.coffee @ 8:6fd0a307850f

check empty strings and users
author Mathias Gebbe <mgebbe@intevation.de>
date Wed, 11 Jun 2014 21:58:41 +0200
parents 98a070c98982
children a52b5b244e51
line wrap: on
line diff
--- a/src/pumpio.coffee	Wed Jun 11 02:32:53 2014 +0200
+++ b/src/pumpio.coffee	Wed Jun 11 21:58:41 2014 +0200
@@ -126,8 +126,11 @@
      oauth.get noteurl, token, secret, callback
   ], (err,result) ->
     #console.log 'PUMP BODY:' + result
-    result = JSON.parse(result)
-    callback null, result
+    if err
+      callback null, null
+    else
+      result = JSON.parse(result)
+      callback null, result
   return
 
 isPublicActivity = (act) ->
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)