summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-05-25 11:20:52 +0100
committerPhil Hughes <me@iamphill.com>2017-05-25 11:20:52 +0100
commit625d3442061d102f7020ef322c2c2febafc891aa (patch)
tree49e24dcf7f1fbc2664c8695a422cc3cdf61e8c53
parentf452cb7733c1659c5c8de7f2b9fa7bc2bf077db7 (diff)
downloadgitlab-ce-625d3442061d102f7020ef322c2c2febafc891aa.tar.gz
renamed path to web_url in endpoint
-rw-r--r--app/assets/javascripts/issue_show/components/app.vue4
-rw-r--r--app/serializers/issue_entity.rb2
-rw-r--r--spec/javascripts/issue_show/components/app_spec.js12
3 files changed, 9 insertions, 9 deletions
diff --git a/app/assets/javascripts/issue_show/components/app.vue b/app/assets/javascripts/issue_show/components/app.vue
index 90312bade2f..74614984097 100644
--- a/app/assets/javascripts/issue_show/components/app.vue
+++ b/app/assets/javascripts/issue_show/components/app.vue
@@ -124,8 +124,8 @@ export default {
this.service.updateIssuable(this.store.formState)
.then(res => res.json())
.then((data) => {
- if (location.pathname !== data.path) {
- gl.utils.visitUrl(data.path);
+ if (location.pathname !== data.web_url) {
+ gl.utils.visitUrl(data.web_url);
} else if (data.confidential !== this.isConfidential) {
gl.utils.visitUrl(location.pathname);
}
diff --git a/app/serializers/issue_entity.rb b/app/serializers/issue_entity.rb
index 6bc8d0f70c3..35df95549b7 100644
--- a/app/serializers/issue_entity.rb
+++ b/app/serializers/issue_entity.rb
@@ -10,7 +10,7 @@ class IssueEntity < IssuableEntity
expose :milestone, using: API::Entities::Milestone
expose :labels, using: LabelEntity
- expose :path do |issue|
+ expose :web_url do |issue|
namespace_project_issue_path(issue.project.namespace, issue.project, issue)
end
end
diff --git a/spec/javascripts/issue_show/components/app_spec.js b/spec/javascripts/issue_show/components/app_spec.js
index b9d352479c7..db146c4a1ee 100644
--- a/spec/javascripts/issue_show/components/app_spec.js
+++ b/spec/javascripts/issue_show/components/app_spec.js
@@ -116,7 +116,7 @@ describe('Issuable output', () => {
json() {
return {
confidential: false,
- path: location.pathname,
+ web_url: location.pathname,
};
},
});
@@ -140,7 +140,7 @@ describe('Issuable output', () => {
json() {
return {
confidential: true,
- path: location.pathname,
+ web_url: location.pathname,
};
},
});
@@ -182,7 +182,7 @@ describe('Issuable output', () => {
resolve({
json() {
return {
- path: location.pathname,
+ web_url: location.pathname,
confidential: vm.isConfidential,
};
},
@@ -206,7 +206,7 @@ describe('Issuable output', () => {
resolve({
json() {
return {
- path: '/testing-issue-move',
+ web_url: '/testing-issue-move',
confidential: vm.isConfidential,
};
},
@@ -251,7 +251,7 @@ describe('Issuable output', () => {
spyOn(vm.service, 'deleteIssuable').and.callFake(() => new Promise((resolve) => {
resolve({
json() {
- return { path: '/test' };
+ return { web_url: '/test' };
},
});
}));
@@ -273,7 +273,7 @@ describe('Issuable output', () => {
spyOn(vm.service, 'deleteIssuable').and.callFake(() => new Promise((resolve) => {
resolve({
json() {
- return { path: '/test' };
+ return { web_url: '/test' };
},
});
}));