Skip to content

Commit

Permalink
feat(send-email-code): send verification code by email before login/s…
Browse files Browse the repository at this point in the history
  • Loading branch information
leomp12 committed Sep 13, 2021
1 parent 5c3908d commit 9589c2f
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/methods/send-email-code.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { passport } from '@ecomplus/client'

/**
* @method
* @name EcomPassport#sendEmailCode
* @description Send verification code by email before login/signup.
*
* @param {string} email - Customer main email address
*
* @returns {Promise<response|error>}
*
* @example
ecomPassport.sendEmailCode('example@mail.com')
.catch(console.error)
*/

export default ({ storeId, lang }, emitter, [email]) => passport({
url: `/${lang}/email-code`,
storeId,
method: 'PUT',
data: {
email
}
})

0 comments on commit 9589c2f

Please sign in to comment.