Formatting, explicit async
This commit is contained in:
parent
5fd7e50893
commit
bd781e1937
@ -216,13 +216,14 @@ Promise.all([
|
|||||||
const Contributor = kredits.Contributor;
|
const Contributor = kredits.Contributor;
|
||||||
const Contribution = kredits.Contribution;
|
const Contribution = kredits.Contribution;
|
||||||
|
|
||||||
function createContribution(nickname, attrs) {
|
async function createContribution(nickname, attrs) {
|
||||||
console.log(`Creating review contribution for ${nickname}...`);
|
console.log(`Creating review contribution for ${nickname}...`);
|
||||||
console.log(util.inspect(attrs, { depth: 1, colors: true }));
|
console.log(util.inspect(attrs, { depth: 1, colors: true }));
|
||||||
|
|
||||||
return Contribution.add(attrs).catch(error => {
|
return Contribution.add(attrs)
|
||||||
console.error(`Error:`, error.message);
|
.catch(error => {
|
||||||
});
|
console.error(`Error:`, error.message);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
generateContributionData(reviews, Contributor).then(
|
generateContributionData(reviews, Contributor).then(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user