WHOOPS
parent
21ccaa56df
commit
d4fa74097d
|
|
@ -87,7 +87,7 @@ module.exports = async function (req, res) {
|
||||||
|
|
||||||
|
|
||||||
function getRandom() {
|
function getRandom() {
|
||||||
return new Promise(res => {
|
return new Promise(resolve => {
|
||||||
request({
|
request({
|
||||||
url: 'http://colorhunt.co/hunt.php',
|
url: 'http://colorhunt.co/hunt.php',
|
||||||
form: {
|
form: {
|
||||||
|
|
@ -96,7 +96,7 @@ function getRandom() {
|
||||||
tags: ''
|
tags: ''
|
||||||
}
|
}
|
||||||
}, function(error, res, body) {
|
}, function(error, res, body) {
|
||||||
res(body);
|
resolve(body);
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue