2016-10-26 04:02:58 -04:00
|
|
|
/* eslint-disable */
|
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() {
|
|
|
|
return $.ajax({
|
|
|
|
dataType: 'json',
|
|
|
|
url: this.conflictsPath
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
submitResolveConflicts(data) {
|
|
|
|
return $.ajax({
|
|
|
|
url: this.resolveConflictsPath,
|
|
|
|
data: JSON.stringify(data),
|
|
|
|
contentType: 'application/json',
|
|
|
|
dataType: 'json',
|
|
|
|
method: 'POST'
|
|
|
|
});
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
global.mergeConflicts.mergeConflictsService = mergeConflictsService;
|
|
|
|
|
|
|
|
})(window.gl || (window.gl = {}));
|