Changes for code consistency

This commit is contained in:
Jarzon
2017-03-15 13:08:22 -04:00
parent e2f94cb1e7
commit 3bba7025d4

View File

@@ -522,7 +522,6 @@ SteamCommunity.prototype.getGroupHistory = function(gid, page, callback) {
SteamCommunity.prototype.getAllGroupComments = function(gid, from, count, callback) { SteamCommunity.prototype.getAllGroupComments = function(gid, from, count, callback) {
var options = { var options = {
uri: "http://steamcommunity.com/comment/Clan/render/" + gid.getSteamID64() + "/-1/", uri: "http://steamcommunity.com/comment/Clan/render/" + gid.getSteamID64() + "/-1/",
method: "POST",
form: { form: {
start: from, start: from,
count: count count: count
@@ -530,7 +529,7 @@ SteamCommunity.prototype.getAllGroupComments = function(gid, from, count, callba
}; };
var self = this; var self = this;
this.httpRequest(options, function(err, response, body) { this.httpRequestPost(options, function(err, response, body) {
if (err) { if (err) {
callback(err); callback(err);
return; return;
@@ -538,7 +537,7 @@ SteamCommunity.prototype.getAllGroupComments = function(gid, from, count, callba
var comments = []; var comments = [];
$ = Cheerio.load(JSON.parse(body).comments_html); var $ = Cheerio.load(JSON.parse(body).comments_html);
$(".commentthread_comment_content").each(function () { $(".commentthread_comment_content").each(function () {
var comment = {}; var comment = {};
@@ -561,7 +560,8 @@ SteamCommunity.prototype.getAllGroupComments = function(gid, from, count, callba
}; };
SteamCommunity.prototype.deleteGroupComment = function(gid, cid, callback) { SteamCommunity.prototype.deleteGroupComment = function(gid, cid, callback) {
if(Number.isInteger(cid)) {
if(typeof cid !== 'string') {
cid = cid.toString(); cid = cid.toString();
} }