Skip to content

Commit

Permalink
fix: handle downloads without auth
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik committed Apr 22, 2020
1 parent 0bbfc62 commit b58d8bb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion server/src/routes/v1/apps/handlers/getAppFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@ module.exports = {
const knex = h.context.db

const isAdmin = currentUserIsManager(request)
const user = await getCurrentUserFromRequest(request)
let user = null
try {
user = await getCurrentUserFromRequest(request)
} catch (err) {
//no user in request, anonymous
debug('no user in request')
}

debug('user:', user)
debug('isAdmin:', isAdmin)
Expand Down

0 comments on commit b58d8bb

Please sign in to comment.