Penambahan fitur block user: 50%
Fix: - app/(application)/(user)/forum/[id]/index.tsx - app/(application)/(user)/home.tsx - screens/Forum/ListPage.tsx - screens/Forum/MenuDrawerSection.tsx/MenuBeranda.tsx - service/api-client/api-master.ts - service/api-client/api-user.ts ### No Issue
This commit is contained in:
@@ -14,3 +14,25 @@ export async function apiDeleteUser({id}:{id: string}) {
|
||||
const response = await apiConfig.delete(`/mobile/user/${id}`);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
export async function apiForumBlockUser({
|
||||
data,
|
||||
}: {
|
||||
data: {
|
||||
// Id yang di blokir
|
||||
blockedId: string;
|
||||
// Id yang melakukan blokir
|
||||
blockerId: string;
|
||||
menuFeature: "Event" | "Forum";
|
||||
};
|
||||
}) {
|
||||
console.log("[FETCH API]", data);
|
||||
try {
|
||||
const response = await apiConfig.post(`/mobile/block-user`, {
|
||||
data: data,
|
||||
});
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user