首个可运行的版本

This commit is contained in:
2026-06-12 23:14:12 +08:00
commit b3d90c65f8
86 changed files with 4808 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
import api from './client'
export const friendsApi = {
getFriends: () => api.get('/friends/'),
getPendingRequests: () => api.get('/friends/requests'),
sendRequest: (toUserId: string, message?: string) =>
api.post('/friends/request', { to_user_id: toUserId, message }),
acceptRequest: (requestId: string) =>
api.put(`/friends/request/${requestId}/accept`),
rejectRequest: (requestId: string) =>
api.put(`/friends/request/${requestId}/reject`),
removeFriend: (friendId: string) =>
api.delete(`/friends/${friendId}`),
}