summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/sidebar/services/sidebar_service.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/sidebar/services/sidebar_service.js')
-rw-r--r--app/assets/javascripts/sidebar/services/sidebar_service.js15
1 files changed, 13 insertions, 2 deletions
diff --git a/app/assets/javascripts/sidebar/services/sidebar_service.js b/app/assets/javascripts/sidebar/services/sidebar_service.js
index 59d4f6ed388..3b8903b4a4c 100644
--- a/app/assets/javascripts/sidebar/services/sidebar_service.js
+++ b/app/assets/javascripts/sidebar/services/sidebar_service.js
@@ -18,7 +18,7 @@ export default class SidebarService {
this.moveIssueEndpoint = endpointMap.moveIssueEndpoint;
this.projectsAutocompleteEndpoint = endpointMap.projectsAutocompleteEndpoint;
this.fullPath = endpointMap.fullPath;
- this.id = endpointMap.id;
+ this.iid = endpointMap.iid;
SidebarService.singleton = this;
}
@@ -37,7 +37,7 @@ export default class SidebarService {
: sidebarDetailsQuery,
variables: {
fullPath: this.fullPath,
- iid: this.id.toString(),
+ iid: this.iid.toString(),
},
}),
]);
@@ -47,6 +47,17 @@ export default class SidebarService {
return axios.put(this.endpoint, { [key]: data });
}
+ updateWithGraphQl(mutation, variables) {
+ return gqClient.mutate({
+ mutation,
+ variables: {
+ ...variables,
+ projectPath: this.fullPath,
+ iid: this.iid.toString(),
+ },
+ });
+ }
+
getProjectsAutocomplete(searchTerm) {
return axios.get(this.projectsAutocompleteEndpoint, {
params: {