currencyservice: less logs
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
This commit is contained in:
parent
59063ff44a
commit
4f631ce4f6
1 changed files with 3 additions and 4 deletions
|
@ -53,7 +53,6 @@ function _getCurrencyData (callback) {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
console.log('Using cached currency data...');
|
|
||||||
callback(_data);
|
callback(_data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -83,7 +82,7 @@ function getSupportedCurrencies (call, callback) {
|
||||||
* Converts between currencies
|
* Converts between currencies
|
||||||
*/
|
*/
|
||||||
function convert (call, callback) {
|
function convert (call, callback) {
|
||||||
console.log('Starting conversion request...');
|
console.log('received conversion request');
|
||||||
try {
|
try {
|
||||||
_getCurrencyData((data) => {
|
_getCurrencyData((data) => {
|
||||||
const request = call.request;
|
const request = call.request;
|
||||||
|
@ -107,11 +106,11 @@ function convert (call, callback) {
|
||||||
result.nanos = Math.floor(result.nanos)
|
result.nanos = Math.floor(result.nanos)
|
||||||
result.currency_code = request.to_code;
|
result.currency_code = request.to_code;
|
||||||
|
|
||||||
console.log(`Conversion request successful ${result.nanos}..${result.nanos}`);
|
console.log(`conversion request successful`);
|
||||||
callback(null, result);
|
callback(null, result);
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('Conversion request failed.');
|
console.error('conversion request failed.');
|
||||||
console.error(err);
|
console.error(err);
|
||||||
callback(err.message);
|
callback(err.message);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue