diff options
author | Tim Zallmann <tzallmann@gitlab.com> | 2019-07-09 08:44:19 +0000 |
---|---|---|
committer | Kushal Pandya <kushalspandya@gmail.com> | 2019-07-09 08:44:19 +0000 |
commit | b9e52612feb4956f0b3cc26af0f98810e67a5287 (patch) | |
tree | d9b851e9ef3e50cdb7e4ad181d5313666a17e0fe /app/assets/javascripts/api.js | |
parent | 9d079194652b94c7cf9d94b4c757ffa1fcdfbcf1 (diff) | |
download | gitlab-ce-b9e52612feb4956f0b3cc26af0f98810e67a5287.tar.gz |
Updates on success of an MR the count on top and in other tabs
New API endpoint for merge request count
Updates all open tabs at the same time with one call
Restructured API response
API response changed to 401 if no current_user
Added API + JS specs
Fix for Static Check
Updated Count on Open/Close, Assign/Unassign of MR's
Checking if MR Count is refreshed
Added # frozen_string_literal: true to spec
Added Changelog
Diffstat (limited to 'app/assets/javascripts/api.js')
-rw-r--r-- | app/assets/javascripts/api.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/assets/javascripts/api.js b/app/assets/javascripts/api.js index 4f66a5d080c..a649c521405 100644 --- a/app/assets/javascripts/api.js +++ b/app/assets/javascripts/api.js @@ -24,6 +24,7 @@ const Api = { issuableTemplatePath: '/:namespace_path/:project_path/templates/:type/:key', projectTemplatePath: '/api/:version/projects/:id/templates/:type/:key', projectTemplatesPath: '/api/:version/projects/:id/templates/:type', + userCountsPath: '/api/:version/user_counts', usersPath: '/api/:version/users.json', userPath: '/api/:version/users/:id', userStatusPath: '/api/:version/users/:id/status', @@ -312,6 +313,11 @@ const Api = { }); }, + userCounts() { + const url = Api.buildUrl(this.userCountsPath); + return axios.get(url); + }, + userStatus(id, options) { const url = Api.buildUrl(this.userStatusPath).replace(':id', encodeURIComponent(id)); return axios.get(url, { |