Commit 313971b2 authored by Miguel Rincon's avatar Miguel Rincon

Merge branch 'jnnkl-constants-secure' into 'master'

Refactor Constants in security_reports

See merge request gitlab-org/gitlab!71079
parents 5eaaf70a beeb25e6
import { REPORT_TYPE_SAST } from '~/vue_shared/security_reports/constants';
import { fetchDiffData } from '../../utils'; import { fetchDiffData } from '../../utils';
import * as types from './mutation_types'; import * as types from './mutation_types';
...@@ -14,7 +15,7 @@ export const receiveDiffError = ({ commit }, response) => ...@@ -14,7 +15,7 @@ export const receiveDiffError = ({ commit }, response) =>
export const fetchDiff = ({ state, rootState, dispatch }) => { export const fetchDiff = ({ state, rootState, dispatch }) => {
dispatch('requestDiff'); dispatch('requestDiff');
return fetchDiffData(rootState, state.paths.diffEndpoint, 'sast') return fetchDiffData(rootState, state.paths.diffEndpoint, REPORT_TYPE_SAST)
.then((data) => { .then((data) => {
dispatch('receiveDiffSuccess', data); dispatch('receiveDiffSuccess', data);
}) })
......
import { REPORT_TYPE_SECRET_DETECTION } from '~/vue_shared/security_reports/constants';
import { fetchDiffData } from '../../utils'; import { fetchDiffData } from '../../utils';
import * as types from './mutation_types'; import * as types from './mutation_types';
...@@ -14,7 +15,7 @@ export const receiveDiffError = ({ commit }, response) => ...@@ -14,7 +15,7 @@ export const receiveDiffError = ({ commit }, response) =>
export const fetchDiff = ({ state, rootState, dispatch }) => { export const fetchDiff = ({ state, rootState, dispatch }) => {
dispatch('requestDiff'); dispatch('requestDiff');
return fetchDiffData(rootState, state.paths.diffEndpoint, 'secret_detection') return fetchDiffData(rootState, state.paths.diffEndpoint, REPORT_TYPE_SECRET_DETECTION)
.then((data) => { .then((data) => {
dispatch('receiveDiffSuccess', data); dispatch('receiveDiffSuccess', data);
}) })
......
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