Skip to content

Commit

Permalink
Set gist file name to gist name.
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertNorthard committed Feb 18, 2017
1 parent 9d46ce9 commit 948e7c1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions gist.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ var gist = (function($) {
client.create = function(name, description, data, success, error) {

var payload = {
"description": description,
"files": {
"file1.txt": {
"content": data
}
}
description: description,
files: { }
};

payload.files[name] = {
content: data
};

$.ajax({
url: 'https://api.github.com/gists',
type: 'POST',
Expand Down

0 comments on commit 948e7c1

Please sign in to comment.