Mobile notification & EULA route #40

Merged
bagasbanuna merged 21 commits from mobile-notification/9-jan-26 into staging 2026-01-09 17:47:41 +08:00
37 changed files with 129 additions and 2826 deletions
Showing only changes of commit 819812149f - Show all commits

View File

@@ -1,6 +1,6 @@
{
"name": "hipmi",
"version": "1.5.22",
"version": "1.5.23",
"private": true,
"prisma": {
"seed": "bun prisma/seed.ts"

View File

@@ -1,5 +1,6 @@
import _ from "lodash";
import { NextResponse } from "next/server";
import prisma from "@/lib/prisma";
export { GET };
@@ -12,7 +13,6 @@ async function GET(request: Request) {
const skipData = Number(page) * takeData - takeData;
console.log("[CATEGORY]", category);
let fixData;
try {
if (category === "dashboard") {

View File

@@ -29,6 +29,11 @@ async function GET(request: Request, { params }: { params: { id: string } }) {
},
},
},
Event: {
select: {
tanggal: true,
},
},
},
});

View File

@@ -153,6 +153,7 @@ async function GET(request: Request) {
select: {
id: true,
title: true,
tanggal: true,
Author: {
select: {
id: true,

View File

@@ -11,6 +11,24 @@ async function POST(request: Request, { params }: { params: { id: string } }) {
console.log("[ID]", id);
try {
const content = await prisma.forum_Komentar.findUnique({
where: {
id: id,
},
});
const reportList = await prisma.forumMaster_KategoriReport.findUnique({
where: {
id: data.categoryId,
},
});
const msg = `Report Komentar: "${content?.komentar}" dengan kategori \n\n\n${reportList?.title} : \n\n${reportList?.deskripsi}`;
const res = await fetch(
`https://wa.wibudev.com/code?nom=6282340374412&text=${msg}`,
{ cache: "no-cache" }
);
if (data.categoryId) {
fixData = await prisma.forum_ReportKomentar.create({
data: {

View File

@@ -11,6 +11,18 @@ async function POST(request: Request, { params }: { params: { id: string } }) {
console.log("[ID]", id);
try {
const content = await prisma.forum_Posting.findUnique({
where: {
id: id,
},
});
const msg = `Report Postingan: "${content?.diskusi}"`;
const res = await fetch(
`https://wa.wibudev.com/code?nom=6282340374412&text=${msg}`,
{ cache: "no-cache" }
);
if (data.categoryId) {
fixData = await prisma.forum_ReportPosting.create({
data: {

View File

@@ -23,6 +23,6 @@
"@/*": ["./src/*"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", "src/app_modules/investasi/proses_transaksi/view.jsx", "src/app/api/investasi/midtrans/[id]/route.ts", "src/app_modules/job/create/TextEdit.tsx"],
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", "src/app_modules/investasi/proses_transaksi/view.jsx", "src/app/api/investasi/midtrans/[id]/route.ts", "src/app_modules/job/create/TextEdit.tsx", "src/app/api/mobile/forum/[id]/report-comment/route.ts"],
"exclude": ["node_modules"]
}