Integrasi API: Admin Forum
Fix: app/(application)/admin/forum/[id]/index.tsx app/(application)/admin/forum/[id]/list-comment.tsx app/(application)/admin/forum/[id]/list-report-comment.tsx app/(application)/admin/forum/[id]/list-report-posting.tsx app/(application)/admin/forum/index.tsx app/(application)/admin/forum/posting.tsx app/(application)/admin/forum/report-comment.tsx app/(application)/admin/forum/report-posting.tsx screens/Admin/listPageAdmin.tsx service/api-admin/api-admin-forum.ts ### No Issue
This commit is contained in:
@@ -41,3 +41,51 @@ export async function apiAdminForumCommentById({
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
export async function apiAdminForumListReportCommentById({
|
||||
id,
|
||||
}: {
|
||||
id: string;
|
||||
}) {
|
||||
try {
|
||||
const response = await apiConfig.get(
|
||||
`/mobile/admin/forum/${id}/report-comment`
|
||||
);
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
export async function apiAdminForumDeactivateComment({ id }: { id: string }) {
|
||||
try {
|
||||
const response = await apiConfig.put(`/mobile/admin/forum/${id}/comment`);
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
export async function apiAdminForumListReportPostingById({
|
||||
id,
|
||||
}: {
|
||||
id: string;
|
||||
}) {
|
||||
try {
|
||||
const response = await apiConfig.get(
|
||||
`/mobile/admin/forum/${id}/report-posting`
|
||||
);
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
export async function apiAdminForumDeactivatePosting({ id }: { id: string }) {
|
||||
try {
|
||||
const response = await apiConfig.put(`/mobile/admin/forum/${id}`);
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user