diff options
author | Tiago Botelho <tiagonbotelho@hotmail.com> | 2018-10-01 14:15:31 +0300 |
---|---|---|
committer | Tiago Botelho <tiagonbotelho@hotmail.com> | 2018-10-01 18:11:09 +0300 |
commit | 9b2e17ac71ee446da0f34dada41401803af816c7 (patch) | |
tree | a352314d1cd94dcfd43566997f119d6bdc8730ce /lib/api | |
parent | d924176117f3cc73f539ed90b47e1912a3478cf0 (diff) |
Adds WebIDE commits to UsagePing
Implements UsageCounters model to track feature usage counters
and makes easy to extend for future counters
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/commits.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/api/commits.rb b/lib/api/commits.rb index 5aeffc8fb99..e16dd29d138 100644 --- a/lib/api/commits.rb +++ b/lib/api/commits.rb @@ -108,6 +108,9 @@ module API if result[:status] == :success commit_detail = user_project.repository.commit(result[:result]) + + UsageCounters.first_or_create.increment_counters(:web_ide_commits) if find_user_from_warden + present commit_detail, with: Entities::CommitDetail else render_api_error!(result[:message], 400) |