give
/
src
/
DonorDashboards
/
resources
/
js
/
app
/
components
/
auth-modal
/
utils
Last commit date
index.js
2 years ago
index.js
42 lines
| 1 | import axios from 'axios'; |
| 2 | import {getAPIRoot} from '../../../utils'; |
| 3 | |
| 4 | export const loginWithAPI = ({login, password}) => { |
| 5 | return axios |
| 6 | .post( |
| 7 | getAPIRoot() + 'give-api/v2/donor-dashboard/login', |
| 8 | { |
| 9 | login, |
| 10 | password, |
| 11 | }, |
| 12 | {} |
| 13 | ) |
| 14 | .then((response) => response.data); |
| 15 | }; |
| 16 | |
| 17 | export const verifyEmailWithAPI = ({email, recaptcha}) => { |
| 18 | return axios |
| 19 | .post( |
| 20 | getAPIRoot() + 'give-api/v2/donor-dashboard/verify-email', |
| 21 | { |
| 22 | email, |
| 23 | 'g-recaptcha-response': recaptcha, |
| 24 | }, |
| 25 | {} |
| 26 | ) |
| 27 | .then((response) => response.data); |
| 28 | }; |
| 29 | |
| 30 | |
| 31 | export const resetPasswordWithAPI = (email) => { |
| 32 | return axios |
| 33 | .post( |
| 34 | getAPIRoot() + 'give-api/v2/donor-dashboard/reset-password', |
| 35 | { |
| 36 | email, |
| 37 | }, |
| 38 | {} |
| 39 | ) |
| 40 | .then((response) => response.data); |
| 41 | }; |
| 42 |