Mobile API

Forum add:
- mobile/forum/[id]/comment
- mobile/forum/[id]/report-comment
- mobile/forum/[id]/report-commentar
- mobile/forum/[id]/report-postin
- mobile/master/forum-report

Fix:
- mobile/forum/[id]/route
- mobile/forum/route

### No isssue
This commit is contained in:
2025-09-27 00:01:36 +08:00
parent fab4e2526d
commit a9b57be0a6
8 changed files with 640 additions and 48 deletions

View File

@@ -0,0 +1,28 @@
import { NextResponse } from "next/server";
import prisma from "@/lib/prisma";
export async function GET(request: Request) {
try {
const data = await prisma.forumMaster_KategoriReport.findMany({
orderBy: {
createdAt: "asc",
},
where: {
isActive: true,
},
});
return NextResponse.json({
success: true,
message: "Berhasil mendapatkan data",
data: data,
});
} catch (error) {
console.log("[ERROR]", error);
return NextResponse.json({
success: false,
message: "Gagal mendapatkan data",
reason: (error as Error).message,
});
}
}