Guest User

Untitled

a guest
Jan 23rd, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. import fetch from 'node-fetch';
  2.  
  3. export const createUser = async (user) => {
  4. const response = await fetch(
  5. '/user',
  6. {
  7. method: 'POST',
  8. body: JSON.stringify(user)
  9. },
  10. );
  11.  
  12. const { userId } = await response.json();
  13. return userId;
  14. };
Add Comment
Please, Sign In to add comment