MCPcopy Create free account
hub / github.com/Bitbox-Connect/Bitbox / getUserProfile

Function getUserProfile

client/src/context/ProfileState.jsx:28–42  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

26 };
27
28 const getUserProfile = async () => {
29 try {
30 const response = await fetch(`${VITE_SERVER_PORT}/api/profile/fetchprofile`, {
31 method: 'GET',
32 headers: {
33 'Content-Type': 'application/json',
34 'auth-token': localStorage.getItem('token'),
35 },
36 });
37 const json = await response.json();
38 setUserProfile(json);
39 } catch (error) {
40 console.error('Error fetching profile:', error);
41 }
42 };
43
44 const updateUserProfile = async (name, college, phone, address) => {
45 try {

Callers 3

CommunityFunction · 0.85
MyProfileCardFunction · 0.85
MyProfileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected