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:
2025-10-20 16:34:38 +08:00
parent d31df8c390
commit 1fd9694ebf
10 changed files with 522 additions and 327 deletions

View File

@@ -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;
}
}