Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getUserInfo(userId) {
- return auth.getProfileInfo(userId)
- .then(res => console.log(res))
- }
- //auth service
- function getProfileInfo(userId) {
- return fetch(`${baseUrl}/profiles/${userId}`)
- .then(res => res.json())
- .catch((err) => console.log(err.message));
- }
Advertisement
Add Comment
Please, Sign In to add comment