refactor: fix lint on lib/response.js

Signed-off-by: BoHong Li <raccoon@hackmd.io>
This commit is contained in:
BoHong Li 2019-08-02 01:01:46 +08:00
parent 81cf993358
commit 534b916abb
No known key found for this signature in database
GPG Key ID: 06770355DC9ECD38
1 changed files with 3 additions and 3 deletions

View File

@ -501,17 +501,17 @@ function githubActionGist (req, res, note) {
var title = models.Note.decodeTitle(note.title) var title = models.Note.decodeTitle(note.title)
var filename = title.replace('/', ' ') + '.md' var filename = title.replace('/', ' ') + '.md'
var gist = { var gist = {
'files': {} files: {}
} }
gist.files[filename] = { gist.files[filename] = {
'content': content content: content
} }
var gistUrl = 'https://api.github.com/gists' var gistUrl = 'https://api.github.com/gists'
request({ request({
url: gistUrl, url: gistUrl,
headers: { headers: {
'User-Agent': 'CodiMD', 'User-Agent': 'CodiMD',
'Authorization': 'token ' + accessToken Authorization: 'token ' + accessToken
}, },
method: 'POST', method: 'POST',
json: gist json: gist