logging fixes
This commit is contained in:
parent
606dcf3c4f
commit
cf0ee1c064
13
account.js
13
account.js
|
@ -5,6 +5,7 @@ var U = require('./utils.js');
|
||||||
|
|
||||||
var Keypairs = require('@root/keypairs');
|
var Keypairs = require('@root/keypairs');
|
||||||
var Enc = require('@root/encoding/bytes');
|
var Enc = require('@root/encoding/bytes');
|
||||||
|
var agreers = {};
|
||||||
|
|
||||||
A._getAccountKid = function(me, options) {
|
A._getAccountKid = function(me, options) {
|
||||||
// It's just fine if there's no account, we'll go get the key id we need via the existing key
|
// It's just fine if there's no account, we'll go get the key id we need via the existing key
|
||||||
|
@ -138,8 +139,15 @@ A._registerAccount = function(me, options) {
|
||||||
var agreeToTerms = options.agreeToTerms;
|
var agreeToTerms = options.agreeToTerms;
|
||||||
if (!agreeToTerms) {
|
if (!agreeToTerms) {
|
||||||
agreeToTerms = function(terms) {
|
agreeToTerms = function(terms) {
|
||||||
console.log(
|
if (agreers[options.subscriberEmail]) {
|
||||||
'By using this software you accept this Subscriber Agreement and Terms of Service:'
|
return true;
|
||||||
|
}
|
||||||
|
agreers[options.subscriberEmail] = true;
|
||||||
|
console.info();
|
||||||
|
console.info(
|
||||||
|
'By using this software you (' +
|
||||||
|
options.subscriberEmail +
|
||||||
|
') are agreeing to the following:'
|
||||||
);
|
);
|
||||||
console.info(
|
console.info(
|
||||||
'ACME Subscriber Agreement:',
|
'ACME Subscriber Agreement:',
|
||||||
|
@ -149,6 +157,7 @@ A._registerAccount = function(me, options) {
|
||||||
'Greenlock/ACME.js Terms of Use:',
|
'Greenlock/ACME.js Terms of Use:',
|
||||||
terms.acmeJsTermsUrl
|
terms.acmeJsTermsUrl
|
||||||
);
|
);
|
||||||
|
console.info();
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
} else if (true === agreeToTerms) {
|
} else if (true === agreeToTerms) {
|
||||||
|
|
|
@ -55,7 +55,7 @@ M._init = function(me, tz, locale) {
|
||||||
'https://api.rootprojects.org/api/projects/ACME.js/dependents',
|
'https://api.rootprojects.org/api/projects/ACME.js/dependents',
|
||||||
json: {
|
json: {
|
||||||
maintainer: me.maintainerEmail,
|
maintainer: me.maintainerEmail,
|
||||||
package: me.packageAgent,
|
package: me.packageAgent,
|
||||||
tz: tz,
|
tz: tz,
|
||||||
locale: locale
|
locale: locale
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,10 @@ M._init = function(me, tz, locale) {
|
||||||
return me
|
return me
|
||||||
.request(req)
|
.request(req)
|
||||||
.catch(function(err) {
|
.catch(function(err) {
|
||||||
if (true || me.debug) {
|
if (me.debug) {
|
||||||
|
console.error(
|
||||||
|
'error adding maintainer to support notices:'
|
||||||
|
);
|
||||||
console.error(err);
|
console.error(err);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue