Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Knox <psimyn@gmail.com>2017-09-06 11:02:30 +0300
committerSimon Knox <psimyn@gmail.com>2017-09-06 11:02:30 +0300
commit563c7de58e010ddbede4fdf5de8229617ef9f96f (patch)
tree14132eb94aed4e894ae3fb93030cad3a23b2194e /app/assets/javascripts/api.js
parentfeffc3ec4546bf07d47e6be8b3b63421362103d2 (diff)
api js changes not needed for CE
Diffstat (limited to 'app/assets/javascripts/api.js')
-rw-r--r--app/assets/javascripts/api.js12
1 files changed, 2 insertions, 10 deletions
diff --git a/app/assets/javascripts/api.js b/app/assets/javascripts/api.js
index 501cc43d552..7b00e1fa780 100644
--- a/app/assets/javascripts/api.js
+++ b/app/assets/javascripts/api.js
@@ -6,8 +6,7 @@ const Api = {
namespacesPath: '/api/:version/namespaces.json',
groupProjectsPath: '/api/:version/groups/:id/projects.json',
projectsPath: '/api/:version/projects.json',
- projectLabelsPath: '/:namespace_path/:project_path/labels',
- groupLabelsPath: '/groups/:namespace_path/labels',
+ labelsPath: '/:namespace_path/:project_path/labels',
licensePath: '/api/:version/templates/licenses/:key',
gitignorePath: '/api/:version/templates/gitignores/:key',
gitlabCiYmlPath: '/api/:version/templates/gitlab_ci_ymls/:key',
@@ -75,14 +74,7 @@ const Api = {
},
newLabel(namespacePath, projectPath, data, callback) {
- let url;
- if (projectPath) {
- url = Api.buildUrl(Api.projectLabelsPath)
- .replace(':namespace_path', namespacePath)
- .replace(':project_path', projectPath);
- } else {
- url = Api.buildUrl(Api.groupLabelsPath).replace(':namespace_path', namespacePath);
- }
+ const url = Api.buildUrl(Api.labelsPath);
return $.ajax({
url,
type: 'POST',