mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-31 07:12:49 -04:00
Merge branch 'master' of https://github.com/codecombat/codecombat
This commit is contained in:
commit
93a7530b37
1 changed files with 2 additions and 2 deletions
|
@ -123,8 +123,8 @@ module.exports = class Handler
|
|||
# Keeping it simple for now and just allowing access to the first FETCH_LIMIT results.
|
||||
query = {'original': mongoose.Types.ObjectId(id)}
|
||||
sort = {'created': -1}
|
||||
selectString = 'slug name version commitMessage created' # Is this even working?
|
||||
@modelClass.find(query).select(selectString).lean().limit(FETCH_LIMIT).sort(sort).exec (err, results) =>
|
||||
selectString = 'slug name version commitMessage created permissions' # Is this even working?
|
||||
@modelClass.find(query).select(selectString).limit(FETCH_LIMIT).sort(sort).exec (err, results) =>
|
||||
return @sendDatabaseError(res, err) if err
|
||||
for doc in results
|
||||
return @sendUnauthorizedError(res) unless @hasAccessToDocument(req, doc)
|
||||
|
|
Loading…
Add table
Reference in a new issue