2017-01-10 18:02:20 -05:00
|
|
|
/* eslint-disable no-param-reassign, comma-dangle */
|
2018-01-30 11:47:19 -05:00
|
|
|
import axios from '../lib/utils/axios_utils';
|
2016-12-13 22:01:05 -05:00
|
|
|
|
2016-09-28 06:12:13 -04:00
|
|
|
((global) => {
|
|
|
|
global.mergeConflicts = global.mergeConflicts || {};
|
|
|
|
|
|
|
|
class mergeConflictsService {
|
|
|
|
constructor(options) {
|
|
|
|
this.conflictsPath = options.conflictsPath;
|
|
|
|
this.resolveConflictsPath = options.resolveConflictsPath;
|
|
|
|
}
|
|
|
|
|
|
|
|
fetchConflictsData() {
|
2018-01-30 11:47:19 -05:00
|
|
|
return axios.get(this.conflictsPath);
|
2016-09-28 06:12:13 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
submitResolveConflicts(data) {
|
2018-01-30 11:47:19 -05:00
|
|
|
return axios.post(this.resolveConflictsPath, data);
|
2016-09-28 06:12:13 -04:00
|
|
|
}
|
2017-01-10 17:54:56 -05:00
|
|
|
}
|
2016-09-28 06:12:13 -04:00
|
|
|
|
|
|
|
global.mergeConflicts.mergeConflictsService = mergeConflictsService;
|
|
|
|
})(window.gl || (window.gl = {}));
|