dilyana2001

Untitled

Oct 10th, 2021
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     function getUserInfo(userId) {
  2.         return auth.getProfileInfo(userId)
  3.             .then(res => console.log(res))
  4.     }
  5.  
  6. //auth service
  7. function getProfileInfo(userId) {
  8.     return fetch(`${baseUrl}/profiles/${userId}`)
  9.         .then(res => res.json())
  10.         .catch((err) => console.log(err.message));
  11. }
Advertisement
Add Comment
Please, Sign In to add comment