修正帖子列表、帖子详情的头像与名字显示问题
Change-Id: Ibcb01510f9474ea43c8739f3013c3aaa32e32640
diff --git a/Merge/front/src/api/api_ljc.js b/Merge/front/src/api/api_ljc.js
index b8130ca..1adea99 100644
--- a/Merge/front/src/api/api_ljc.js
+++ b/Merge/front/src/api/api_ljc.js
@@ -1,4 +1,5 @@
import axios from 'axios';
+import { getUserInfo } from '../utils/auth';
const api = axios.create({
baseURL: 'http://10.126.59.25:5715/api/',
@@ -14,8 +15,12 @@
export const getFavorites = (userId) => api.get(`/user/${userId}/favorites`);
// 关注相关API
-export const followUser = (followeeId) => api.post(`/follow/${followeeId}`);
-export const unfollowUser = (followeeId) => api.delete(`/follow/${followeeId}`);
+export const followUser = (followeeId) => {
+ return api.post(`/follow/${followeeId}`);
+};
+export const unfollowUser = (followeeId) => {
+ return api.delete(`/follow/${followeeId}`);
+};
// 帖子相关API
export const getUserPosts = (userId) => api.get(`/user/${userId}/posts`);