mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-05 03:52:14 +00:00
add friends query
This commit is contained in:
parent
b896865865
commit
267dd60fd0
1 changed files with 10 additions and 0 deletions
|
|
@ -28,3 +28,13 @@ module.exports = (store) ->
|
|||
return next(false) unless @session and @session.userId # https://github.com/codeparty/racer/issues/37
|
||||
isServer = not @req.socket
|
||||
next(isServer)
|
||||
|
||||
###
|
||||
Party permissions
|
||||
###
|
||||
store.query.expose "users", "friends", (ids) ->
|
||||
@where("id").within(ids)
|
||||
.only('stats', 'items', 'auth.local.username', 'auth.facebook.displayName')
|
||||
|
||||
store.queryAccess "users", "friends", (ids, next) ->
|
||||
next(true) # no harm in public user stats
|
||||
|
|
|
|||
Loading…
Reference in a new issue