gitlab-org--gitlab-foss/app/assets/javascripts/merge_conflicts/merge_conflict_service.js
2018-01-30 16:47:19 +00:00

23 lines
639 B
JavaScript

/* eslint-disable no-param-reassign, comma-dangle */
import axios from '../lib/utils/axios_utils';
((global) => {
global.mergeConflicts = global.mergeConflicts || {};
class mergeConflictsService {
constructor(options) {
this.conflictsPath = options.conflictsPath;
this.resolveConflictsPath = options.resolveConflictsPath;
}
fetchConflictsData() {
return axios.get(this.conflictsPath);
}
submitResolveConflicts(data) {
return axios.post(this.resolveConflictsPath, data);
}
}
global.mergeConflicts.mergeConflictsService = mergeConflictsService;
})(window.gl || (window.gl = {}));