2017-08-17 22:00:37 +05:30
|
|
|
/* eslint-disable no-param-reassign, comma-dangle */
|
2018-03-17 18:26:18 +05:30
|
|
|
import axios from '../lib/utils/axios_utils';
|
2017-08-17 22:00:37 +05:30
|
|
|
|
2016-11-03 12:29:30 +05:30
|
|
|
((global) => {
|
|
|
|
global.mergeConflicts = global.mergeConflicts || {};
|
|
|
|
|
|
|
|
class mergeConflictsService {
|
|
|
|
constructor(options) {
|
|
|
|
this.conflictsPath = options.conflictsPath;
|
|
|
|
this.resolveConflictsPath = options.resolveConflictsPath;
|
|
|
|
}
|
|
|
|
|
|
|
|
fetchConflictsData() {
|
2018-03-17 18:26:18 +05:30
|
|
|
return axios.get(this.conflictsPath);
|
2016-11-03 12:29:30 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
submitResolveConflicts(data) {
|
2018-03-17 18:26:18 +05:30
|
|
|
return axios.post(this.resolveConflictsPath, data);
|
2016-11-03 12:29:30 +05:30
|
|
|
}
|
2017-08-17 22:00:37 +05:30
|
|
|
}
|
2016-11-03 12:29:30 +05:30
|
|
|
|
|
|
|
global.mergeConflicts.mergeConflictsService = mergeConflictsService;
|
|
|
|
})(window.gl || (window.gl = {}));
|