mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-14 16:02:14 +00:00
Merge branch 'master' into develop
This commit is contained in:
commit
86253018a7
2 changed files with 5 additions and 2 deletions
|
|
@ -33,7 +33,10 @@ module.exports.partySubscribe = partySubscribe = (page, model, params, next, cb)
|
|||
selfQ = model.query('users').withId (model.get('_userId') or model.session.userId) # see http://goo.gl/TPYIt
|
||||
selfQ.fetch (err, user) ->
|
||||
return next(err) if err
|
||||
return next("User not found - this shouldn't be happening!") unless user.get()
|
||||
unless user.get()
|
||||
#return next("User not found - this shouldn't be happening!")
|
||||
console.error "User not found - this shouldn't be happening!"
|
||||
return page.redirect('/logout') #delete model.session.userId
|
||||
|
||||
finished = (descriptors, paths) ->
|
||||
model.subscribe.apply model, descriptors.concat ->
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ module.exports.view = (req, res, next) ->
|
|||
module.exports.allowCrossDomain = (req, res, next) ->
|
||||
res.header "Access-Control-Allow-Origin", (req.headers.origin || "*")
|
||||
res.header "Access-Control-Allow-Methods", "OPTIONS,GET,POST,PUT,HEAD,DELETE"
|
||||
res.header "Access-Control-Allow-Headers", "Content-Type,X-Requested-With,x-api-user,x-api-key"
|
||||
res.header "Access-Control-Allow-Headers", "Content-Type,Accept,Content-Encoding,X-Requested-With,x-api-user,x-api-key"
|
||||
|
||||
# wtf is this for?
|
||||
if req.method is 'OPTIONS'
|
||||
|
|
|
|||
Loading…
Reference in a new issue