Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const register = async params => {
- const verifyParams = await verify(params);
- const passwordMatch = await passwordCheck(params);
- const user = await createUser(params);
- return { verifyParams, passwordMatch, user };
- };
- register({
- username: 'moosch',
- password: 'terryfolds',
- confPassword: 'terryfolds',
- })
- .then(data => { // returns the object from line 5
- return data.user;
- })
- .catch(error => {
- throw new Error(error);
- });
Add Comment
Please, Sign In to add comment