fix eslint violations in repo editor files
This commit is contained in:
parent
725a4fef5a
commit
cdd741ee22
|
|
@ -96,7 +96,8 @@ const Api = {
|
|||
.done(projects => callback(projects));
|
||||
},
|
||||
|
||||
commitMultiple(id, data, callback) {
|
||||
commitMultiple(id, data) {
|
||||
// see https://docs.gitlab.com/ce/api/commits.html#create-a-commit-with-multiple-files-and-actions
|
||||
const url = Api.buildUrl(Api.commitPath)
|
||||
.replace(':id', id);
|
||||
return this.wrapAjaxCall({
|
||||
|
|
|
|||
|
|
@ -43,10 +43,11 @@ export default {
|
|||
};
|
||||
Store.submitCommitsLoading = true;
|
||||
Service.commitFiles(payload)
|
||||
.then(this.resetCommitState);
|
||||
.then(this.resetCommitState)
|
||||
.catch(() => Flash('An error occured while committing your changes'));
|
||||
},
|
||||
|
||||
resetCommitState(data) {
|
||||
resetCommitState() {
|
||||
this.submitCommitsLoading = false;
|
||||
this.changedFiles = [];
|
||||
this.commitMessage = '';
|
||||
|
|
|
|||
|
|
@ -67,13 +67,13 @@ const RepoService = {
|
|||
|
||||
commitFiles(payload) {
|
||||
return Api.commitMultiple(Store.projectId, payload)
|
||||
.then((data) => {
|
||||
if (data.short_id && data.stats) {
|
||||
Flash(`Your changes have been committed. Commit ${data.short_id} with ${data.stats.additions} additions, ${data.stats.deletions} deletions.`, 'notice');
|
||||
} else {
|
||||
Flash(data.message);
|
||||
}
|
||||
});
|
||||
.then((data) => {
|
||||
if (data.short_id && data.stats) {
|
||||
Flash(`Your changes have been committed. Commit ${data.short_id} with ${data.stats.additions} additions, ${data.stats.deletions} deletions.`, 'notice');
|
||||
} else {
|
||||
Flash(data.message);
|
||||
}
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue