diff --git a/api/palette.js b/api/palette.js index de5710d..62ece75 100644 --- a/api/palette.js +++ b/api/palette.js @@ -87,7 +87,7 @@ module.exports = async function (req, res) { function getRandom() { - return new Promise(res => { + return new Promise(resolve => { request({ url: 'http://colorhunt.co/hunt.php', form: { @@ -96,7 +96,7 @@ function getRandom() { tags: '' } }, function(error, res, body) { - res(body); + resolve(body); }) }); } \ No newline at end of file