Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export const createUser = () => {
- return async (dispatch) => {
- dispatch({ type: CREATE_USER });
- console.log('we are in the create user function');
- try {
- let response = await fetch('secret.com/v1/login/signup', {
- method: 'POST',
- headers: {
- Accept: 'application/json',
- 'Content-Type': 'application/json'
- },
- body: JSON.stringify({
- email: 'test1231273123@test.com',
- password: 'Asadasd123123',
- first_name: 'joe',
- last_name: 'doe',
- phone_number: '373738'
- })
- });
- console.log('response ' + JSON.stringify(response));
- } catch (error) {
- console.log(error);
- }
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement