2017-01-10 18:02:20 -05:00
|
|
|
/* eslint-disable no-param-reassign, comma-dangle */
|
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() {
|
|
|
|
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'
|
|
|
|
});
|
|
|
|
}
|
2017-01-10 17:54:56 -05:00
|
|
|
}
|
2016-09-28 06:12:13 -04:00
|
|
|
|
|
|
|
global.mergeConflicts.mergeConflictsService = mergeConflictsService;
|
|
|
|
})(window.gl || (window.gl = {}));
|