|
|
@@ -14,6 +14,12 @@ define([ |
|
|
|
records: null, |
|
|
|
|
|
|
|
init: function () { |
|
|
|
if (sheetsConfig.roles) { |
|
|
|
this.update = function () {}; |
|
|
|
this.onGetRows(null, sheetsConfig.roles); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
this.doc = new googleSheets(sheetsConfig.sheetId); |
|
|
|
this.doc.useServiceAccountAuth(creds, this.onAuth.bind(this)); |
|
|
|
}, |
|
|
@@ -54,8 +60,10 @@ define([ |
|
|
|
o.messagePrefix = o.messageprefix; |
|
|
|
delete o.messageprefix; |
|
|
|
|
|
|
|
o.items = JSON.parse(o.items || "[]"); |
|
|
|
o.skins = JSON.parse(o.skins || "[]"); |
|
|
|
if (typeof (o.items) == 'string') |
|
|
|
o.items = JSON.parse(o.items || "[]"); |
|
|
|
if (typeof (o.skins) == 'string') |
|
|
|
o.skins = JSON.parse(o.skins || "[]"); |
|
|
|
|
|
|
|
return o; |
|
|
|
}); |
|
|
|