From 28d6fd1832d5fd0d3c47614ba11071b38db48976 Mon Sep 17 00:00:00 2001 From: Jacob Schatz Date: Tue, 25 Jul 2017 13:52:46 -0400 Subject: Attempts (unsuccessfully) a POST call to make commits. --- app/assets/javascripts/api.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'app/assets/javascripts/api.js') diff --git a/app/assets/javascripts/api.js b/app/assets/javascripts/api.js index af1fcbae570..c874283274f 100644 --- a/app/assets/javascripts/api.js +++ b/app/assets/javascripts/api.js @@ -96,12 +96,15 @@ const Api = { .done(projects => callback(projects)); }, - commitMultiple(id, data, callback) { + commitMultiple(id, data, callback, token) { // 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 $.ajax({ url, + headers: { + 'PRIVATE_TOKEN': token, + }, type: 'POST', data: data, dataType: 'json', -- cgit v1.2.1