Comparing version 1.0.22 to 1.0.23
@@ -61,4 +61,9 @@ const csvWriter = require('csv-write-stream'); | ||
console.log("Create config from row: " + row.name); | ||
clientConfig = createClientConfig(row); | ||
clientConfig = { | ||
name: row.name, | ||
clientId: row.clientId, | ||
secretKey: row.secretKey, | ||
scope: row.scope}; | ||
console.log("Return config: " + clientConfig.toString()); | ||
return clientConfig; | ||
} | ||
@@ -68,3 +73,3 @@ }) | ||
}); | ||
return clientConfig.toString(); | ||
return clientConfig; | ||
} | ||
@@ -78,3 +83,8 @@ | ||
.on('data', function (row) { | ||
listOfClientConfig.push(createClientConfig(row).toArray()); | ||
let clientConfig = { | ||
name: row.name, | ||
clientId: row.clientId, | ||
secretKey: row.secretKey, | ||
scope: row.scope}; | ||
listOfClientConfig.push(clientConfig); | ||
}) | ||
@@ -86,17 +96,1 @@ .on('end', function (data) { | ||
} | ||
class ClientConfig { | ||
constructor(name, clientId, secretKey, scope) { | ||
this.name = name; | ||
this.clientId = clientId; | ||
this.secretKey = secretKey; | ||
this.scope = scope; | ||
} | ||
} | ||
function createClientConfig(rowElement) { | ||
return ClientConfig.create( | ||
rowElement.name, | ||
rowElement.clientId, | ||
rowElement.secretKey, | ||
rowElement.scope) | ||
} |
{ | ||
"name": "coaclient", | ||
"version": "1.0.22", | ||
"version": "1.0.23", | ||
"description": "Custom Node.js library for manage CourseraOAuth2 API tokens", | ||
@@ -5,0 +5,0 @@ "main": "coaclient", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9167
81