mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-23 07:38:07 -05:00
use params prop instead of inline query params
This commit is contained in:
parent
ee8cdac748
commit
55cb112ee9
1 changed files with 3 additions and 2 deletions
|
@ -81,8 +81,9 @@ module.exports.validateEmailLocally = email => {
|
||||||
module.exports.validateEmailRemotely = email => (
|
module.exports.validateEmailRemotely = email => (
|
||||||
new Promise(resolve => {
|
new Promise(resolve => {
|
||||||
api({
|
api({
|
||||||
uri: `/accounts/check_email/?email=${email}`,
|
host: '', // not handled by API; use existing infrastructure
|
||||||
host: '' // Not handled by the API, use existing infrastructure
|
params: {email: email},
|
||||||
|
uri: '/accounts/check_email/'
|
||||||
}, (err, body, res) => {
|
}, (err, body, res) => {
|
||||||
if (err || res.statusCode !== 200 || !body || body.length < 1 || !body[0].msg) {
|
if (err || res.statusCode !== 200 || !body || body.length < 1 || !body[0].msg) {
|
||||||
resolve({valid: false, errMsgId: 'general.apiError'});
|
resolve({valid: false, errMsgId: 'general.apiError'});
|
||||||
|
|
Loading…
Reference in a new issue