| import axios from 'axios'; |
| const api = axios.create({ |
| baseURL: 'http://10.126.59.25:5715/api/', |
| export const getCurrentUser = () => api.get('/current-user'); |
| export const getUser = (userId) => api.get(`/user/${userId}`); |
| export const updateUser = (userId, data) => api.put(`/user/${userId}`, data); |
| export const getFavorites = (userId) => api.get(`/user/${userId}/favorites`); |
| export const followUser = (followeeId) => api.post(`/follow/${followeeId}`); |
| export const unfollowUser = (followeeId) => api.delete(`/follow/${followeeId}`); |
| export const getUserPosts = (userId) => api.get(`/user/${userId}/posts`); |
| export const getUserFollowing = (userId) => api.get(`/user/${userId}/following`); |
| export const getUserInteractions = (userId) => api.get(`/user/${userId}/interactions`); |
| export const getUserFollowers = (userId) => api.get(`/user/${userId}/followers`); |