mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
check if user exists on recurly callback
This commit is contained in:
parent
d9734953a6
commit
885915916a
1 changed files with 2 additions and 0 deletions
|
@ -70,6 +70,8 @@ module.exports =
|
||||||
return callback(error) if error?
|
return callback(error) if error?
|
||||||
User.findById recurlySubscription.account.account_code, (error, user) ->
|
User.findById recurlySubscription.account.account_code, (error, user) ->
|
||||||
return callback(error) if error?
|
return callback(error) if error?
|
||||||
|
if !user?
|
||||||
|
return callback("no user found")
|
||||||
SubscriptionUpdater.syncSubscription recurlySubscription, user?._id, callback
|
SubscriptionUpdater.syncSubscription recurlySubscription, user?._id, callback
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue