Commit 29535c01 authored by Dave Pisek's avatar Dave Pisek

Add migration info comments to direct API calls

* Adds comments to Vue components where we directly call the API
  to raise awareness that there is an epic to move the whole feature
  to GraphQL
parent fc6b8d0a
......@@ -112,6 +112,8 @@ export default {
return Date.parse(date) / 1000;
},
fetchDiscussions() {
// note: this direct API call will be replaced when migrating the vulnerability details page to GraphQL
// related epic: https://gitlab.com/groups/gitlab-org/-/epics/3657
axios
.get(this.vulnerability.discussionsUrl)
.then(({ data, headers: { date } }) => {
......@@ -146,6 +148,8 @@ export default {
});
},
createNotesPoll() {
// note: this polling call will be replaced when migrating the vulnerability details page to GraphQL
// related epic: https://gitlab.com/groups/gitlab-org/-/epics/3657
this.poll = new Poll({
resource: {
fetchNotes: () =>
......
......@@ -208,6 +208,8 @@ export default {
projectFingerprint,
} = this.vulnerability;
// note: this direct API call will be replaced when migrating the vulnerability details page to GraphQL
// related epic: https://gitlab.com/groups/gitlab-org/-/epics/3657
axios
.post(this.vulnerability.createMrUrl, {
vulnerability_feedback: {
......
......@@ -100,6 +100,8 @@ export default {
this.isSavingComment = true;
const { method, url, data, emitName } = this.getSaveConfig(note);
// note: this direct API call will be replaced when migrating the vulnerability details page to GraphQL
// related epic: https://gitlab.com/groups/gitlab-org/-/epics/3657
axios({ method, url, data })
.then(({ data: responseData }) => {
this.isEditingComment = false;
......
......@@ -103,6 +103,8 @@ export default {
// The endpoint can only accept one issue, so we need to do a separate call for each pending reference.
const requests = this.state.pendingReferences.map((reference) => {
// note: this direct API call will be replaced when migrating the vulnerability details page to GraphQL
// related epic: https://gitlab.com/groups/gitlab-org/-/epics/3657
return axios
.post(
this.endpoint,
......@@ -140,6 +142,8 @@ export default {
removeRelatedIssue(idToRemove) {
const issue = this.state.relatedIssues.find(({ id }) => id === idToRemove);
// note: this direct API call will be replaced when migrating the vulnerability details page to GraphQL
// related epic: https://gitlab.com/groups/gitlab-org/-/epics/3657
axios
.delete(joinPaths(this.endpoint, issue.vulnerabilityLinkId.toString()))
.then(() => {
......@@ -152,6 +156,8 @@ export default {
fetchRelatedIssues() {
this.isFetching = true;
// note: this direct API call will be replaced when migrating the vulnerability details page to GraphQL
// related epic: https://gitlab.com/groups/gitlab-org/-/epics/3657
axios
.get(this.endpoint)
.then(({ data }) => {
......
......@@ -79,6 +79,8 @@ export default {
this.fetchRelatedIssues();
},
methods: {
// note: this direct API call will be replaced when migrating the vulnerability details page to GraphQL
// related epic: https://gitlab.com/groups/gitlab-org/-/epics/3657
async fetchRelatedIssues() {
this.isFetchingRelatedIssues = true;
try {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment