Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Schatz <jschatz1@gmail.com>2017-07-25 20:52:46 +0300
committerJacob Schatz <jschatz1@gmail.com>2017-07-25 20:52:46 +0300
commit28d6fd1832d5fd0d3c47614ba11071b38db48976 (patch)
tree49e2cd63b9555f4c3611ad7b22f4111172932e45 /app/assets/javascripts/api.js
parentfcd23d55f9d7766c332371c76040258a6fcb12ff (diff)
Attempts (unsuccessfully) a POST call to make commits.
Diffstat (limited to 'app/assets/javascripts/api.js')
-rw-r--r--app/assets/javascripts/api.js5
1 files changed, 4 insertions, 1 deletions
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',