Skip to content

Commit

Permalink
Merge pull request #659 from dhis2/fix/download-count-v2
Browse files Browse the repository at this point in the history
fix(download-count): increment in v2 api
  • Loading branch information
Birkbjo authored May 5, 2022
2 parents db6c3bf + 805754d commit 392d652
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions server/src/routes/v2/apps.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,12 @@ module.exports = [
`Fetching file for ${appVersion.appId} / ${appVersion.id}`
)

appVersionService
.incrementDownloadCount(appVersion.id, db)
.catch(e =>
request.logger.error('Failed to increment download', e)
)

return h
.response(file.Body)
.type('application/zip')
Expand Down

0 comments on commit 392d652

Please sign in to comment.