websockets implemented

This commit is contained in:
Torsten Schulz
2024-12-04 19:08:26 +01:00
parent d46a51db38
commit 069c97fa90
64 changed files with 2488 additions and 562 deletions

View File

@@ -0,0 +1,22 @@
import apiClient from "@/utils/axios.js";
export const getFriendships = async (acceptedOnly) => {
const response = await apiClient.get(`/api/friendships?acceptedOnly=${acceptedOnly}`);
return response.data;
};
export const endFriendship = async (friendUserId) => {
await apiClient.post("/api/friendships/end", { friendUserId });
};
export const acceptFriendship = async (friendUserId) => {
await apiClient.post("/api/friendships/accept", { friendUserId });
};
export const rejectFriendship = async (friendUserId) => {
await apiClient.post("/api/friendships/reject", { friendUserId });
};
export const withdrawRequest = async (friendUserId) => {
await apiClient.post("/api/friendships/withdraw", { friendUserId });
};