comparison src/routes.coffee @ 17:a52b5b244e51

removed unnecessary underscore and replaced it with async
author Mathias Gebbe <mgebbe@intevation.de>
date Fri, 13 Jun 2014 15:18:36 +0200
parents 6fd0a307850f
children 3e3fa35e3ce2
comparison
equal deleted inserted replaced
16:d2208a4ed5c8 17:a52b5b244e51
45 gpdelete = req.body.gpdelete 45 gpdelete = req.body.gpdelete
46 46
47 fbid = req.body.fbid 47 fbid = req.body.fbid
48 fbtoken = req.body.fbtoken 48 fbtoken = req.body.fbtoken
49 fbdelete = req.body.fbdelete 49 fbdelete = req.body.fbdelete
50 50
51 twdelete = req.body.twdelete 51 twdelete = req.body.twdelete
52 52
53 # create/update userdb entrys 53 # create/update userdb entrys
54 # SET THE CONNECTION BETWEENS PUMPIO AND ESN-ACCOUNT (facebook or google) 54 # SET THE CONNECTION BETWEENS PUMPIO AND ESN-ACCOUNT (facebook or google)
55 55
88 _.each result, (um) -> 88 _.each result, (um) ->
89 if um.user_ESN.indexOf('@google') isnt -1 89 if um.user_ESN.indexOf('@google') isnt -1
90 deleteUsermap(um.id,callback) 90 deleteUsermap(um.id,callback)
91 return 91 return
92 ], (err, result) -> 92 ], (err, result) ->
93 93
94 94
95 #### FACEBOOK STUFF #### 95 #### FACEBOOK STUFF ####
96 if not (fbid?) or not (fbtoken?) or fbid is "" or fbtoken is "" 96 if not (fbid?) or not (fbtoken?) or fbid is "" or fbtoken is ""
97 console.log 'no facebook' 97 console.log 'no facebook'
98 else 98 else
126 if um.user_ESN.indexOf('@twitter') isnt -1 126 if um.user_ESN.indexOf('@twitter') isnt -1
127 deleteUsermap(um.id,callback) 127 deleteUsermap(um.id,callback)
128 return 128 return
129 ], (err, result) -> 129 ], (err, result) ->
130 130
131
132 # go back to main page 131 # go back to main page
133 #res.send JSON.stringify(req.body.pumpobj) 132 #res.send JSON.stringify(req.body.pumpobj)
134 #res.send 'bridge update for:'+ pumpid + '<br>--> ' + gpid + ' ' + gptoken + '<br>--> ' + fbid + ' ' + fbtoken 133 #res.send 'bridge update for:'+ pumpid + '<br>--> ' + gpid + ' ' + gptoken + '<br>--> ' + fbid + ' ' + fbtoken
135 res.redirect('/') 134 res.redirect('/')
136 135
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)