From 55cb112ee995e1d17a1d872d152931239935af7a Mon Sep 17 00:00:00 2001 From: Ben Wheeler Date: Tue, 27 Aug 2019 12:26:56 -0400 Subject: [PATCH] use params prop instead of inline query params --- src/lib/validate.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/validate.js b/src/lib/validate.js index c4deee007..b2ce9ab5a 100644 --- a/src/lib/validate.js +++ b/src/lib/validate.js @@ -81,8 +81,9 @@ module.exports.validateEmailLocally = email => { module.exports.validateEmailRemotely = email => ( new Promise(resolve => { api({ - uri: `/accounts/check_email/?email=${email}`, - host: '' // Not handled by the API, use existing infrastructure + host: '', // not handled by API; use existing infrastructure + params: {email: email}, + uri: '/accounts/check_email/' }, (err, body, res) => { if (err || res.statusCode !== 200 || !body || body.length < 1 || !body[0].msg) { resolve({valid: false, errMsgId: 'general.apiError'});