[READ-ONLY] Mirror of https://github.com/probablykasper/LaRSS. RSS Generator for iTunes larss.kasper.space
rss website
0

Configure Feed

Select the types of activity you want to include in your feed.

Fixed first-time loading of gist not working

KH (Nov 7, 2017, 8:50 PM +0100) 0fdcb49e 24180992

+7 -7
+7 -7
docs/index.js
··· 366 366 xml += ' <itunes:name>' +json.generalInfo.name+ '</itunes:name>\n'; 367 367 xml += ' <itunes:email>' +json.generalInfo.email+ '</itunes:email>\n'; 368 368 xml += ' </itunes:owner>\n'; 369 - 369 + 370 370 for (var i = 0; i < json.items.length; i++) { 371 371 xml += ' <item>\n'; 372 372 xml += ' <guid>' +json.items[i].guid+ '</guid>\n'; ··· 429 429 auth: "token "+pat, 430 430 type: "POST", 431 431 json: req, 432 - onSuccess: function(res) { 433 - res = JSON.parse(res); 432 + onSuccess: function(gist) { 433 + gist = JSON.parse(gist); 434 434 console.log("----------------------------------- createGist suc"); 435 - console.log(res); 435 + console.log(gist); 436 436 var rssFile = gist.files[getFilename(pat).rss]; 437 - callback(res.id, defaultJSON, rssFile.raw_url); 437 + callback(gist.id, defaultJSON, rssFile.raw_url); 438 438 }, 439 439 onError: function(res, code) { 440 440 res = JSON.parse(res); ··· 447 447 448 448 function findGistId(pat, callback) { 449 449 xhr({ 450 - url: "https://api.github.com/gists/"+gistId, 450 + url: "https://api.github.com/gists", 451 451 auth: "token "+pat, 452 452 type: "GET", 453 453 req: "", ··· 456 456 console.log("----------------------------------- findgistid suc"); 457 457 console.log(gists); 458 458 for (var i = 0; i < gists.length; i++) { 459 - if (gist[i].files[getFilename(pat).json]) { 459 + if (gists[i].files[getFilename(pat).json]) { 460 460 callback(gists[i].id); 461 461 return; 462 462 }