diff options
author | Dennis Tang <dennis@dennistang.net> | 2018-10-04 08:19:51 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-10-04 08:19:51 +0000 |
commit | 4edcb02f94ba832929c054097d2f8badc0a34060 (patch) | |
tree | 2b01b32354ff9892200ef07c8b9e56caf37c5c73 /app/assets/javascripts/api.js | |
parent | 18777ec78d8b6040702adc530d2ac5dff0f2ea67 (diff) | |
download | gitlab-ce-4edcb02f94ba832929c054097d2f8badc0a34060.tar.gz |
Resolve "Add status message from within user menu"
Diffstat (limited to 'app/assets/javascripts/api.js')
-rw-r--r-- | app/assets/javascripts/api.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/assets/javascripts/api.js b/app/assets/javascripts/api.js index cd800d75f7a..ecc2440c7e6 100644 --- a/app/assets/javascripts/api.js +++ b/app/assets/javascripts/api.js @@ -22,6 +22,7 @@ const Api = { dockerfilePath: '/api/:version/templates/dockerfiles/:key', issuableTemplatePath: '/:namespace_path/:project_path/templates/:type/:key', usersPath: '/api/:version/users.json', + userStatusPath: '/api/:version/user/status', commitPath: '/api/:version/projects/:id/repository/commits', commitPipelinesPath: '/:project_id/commit/:sha/pipelines', branchSinglePath: '/api/:version/projects/:id/repository/branches/:branch', @@ -266,6 +267,15 @@ const Api = { }); }, + postUserStatus({ emoji, message }) { + const url = Api.buildUrl(this.userStatusPath); + + return axios.put(url, { + emoji, + message, + }); + }, + templates(key, params = {}) { const url = Api.buildUrl(this.templatesPath).replace(':key', key); |