Commit 1e328844 authored by Jacob Schatz's avatar Jacob Schatz

Makes multiple file commits for realz.

parent 28d6fd18
......@@ -106,7 +106,8 @@ const Api = {
'PRIVATE_TOKEN': token,
},
type: 'POST',
data: data,
contentType: "application/json; charset=utf-8",
data: JSON.stringify(data),
dataType: 'json',
})
.done(commitData => callback(commitData))
......
......@@ -22,6 +22,7 @@ function initRepo() {
Store.currentBranch = $("button.dropdown-menu-toggle").attr('data-ref');
Store.checkIsCommitable();
Store.projectId = repo.dataset.projectId;
Store.tempPrivateToken = repo.dataset.tempToken;
new Vue({
el: repo,
......
......@@ -31,7 +31,7 @@ const RepoCommitSection = {
}
Api.commitMultiple(Store.projectId, payload, (data) => {
console.log('got back', data);
})
}, Store.tempPrivateToken);
}
},
......
......@@ -22,6 +22,7 @@ const RepoStore = {
defaultTabSize: 100,
minTabSize: 30,
tabsOverflow: 41,
tempPrivateToken: '',
activeFile: {
active: true,
binary: false,
......
#repo{ data: { url: repo_url(@project), 'project-name' => @project.name, refs_url: refs_namespace_project_path(@project.namespace, @project, format: "json"), project_url: namespace_project_path(@project.namespace, @project), project_id: @project.id } }
#repo{ data: { url: repo_url(@project), 'project-name' => @project.name, refs_url: refs_namespace_project_path(@project.namespace, @project, format: "json"), project_url: namespace_project_path(@project.namespace, @project), project_id: @project.id, temp_token: @current_user.private_token } }
- if can_edit_tree?
= render 'projects/blob/upload', title: _('Upload New File'), placeholder: _('Upload New File'), button_title: _('Upload file'), form_path: project_create_blob_path(@project, @id), method: :post
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment