You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
482 B
JavaScript
18 lines
482 B
JavaScript
var request = require('request-promise');
|
|
var common = require('../../common');
|
|
var options = {};
|
|
|
|
exports.getNewAddress = (req, res, next) => {
|
|
options = common.getOptions();
|
|
options.url = common.getSelLNServerUrl() + '/newaddr?addrType=' + req.query.type;
|
|
request(options).then((body) => {
|
|
res.status(200).json(body);
|
|
})
|
|
.catch(function (err) {
|
|
return res.status(500).json({
|
|
message: "Fetching new address failed!",
|
|
error: err.error
|
|
});
|
|
});
|
|
};
|